This is where I'm gonna keep my machine-to-machine config files.
Clone this repository with submodules:
git clone --recurse-submodules git@github.com:<username>/dotfiles.gitReference guide: https://github.com/drduh/YubiKey-Guide
To quickly set up SSH via YubiKey-backed gpg-agent on a new machine, run:
./scripts/setup-yubikey-ssh.shPrerequisites:
gpg --version
gpgconf --version
ssh -VIf gpg/gpgconf is missing on macOS:
brew install gnupg pinentry-macThis script configures ~/.gnupg/gpg-agent.conf with enable-ssh-support, selects a platform-appropriate pinentry-program when available (macOS: pinentry-mac; Linux: GUI pinentry preferred), adds an SSH include (~/.ssh/config.d/10-gpg-agent.conf) with IdentityAgent, and ensures ~/.ssh/config includes ~/.ssh/config.d/*.conf.
After running it:
ssh-add -L
ssh -T git@github.comIf no key is listed yet, run:
gpg --card-statusIf SSH says agent refused operation and no pinentry appears, reload your shell so GPG_TTY and updatestartuptty are refreshed, then run non-destructive checks first:
echo "$GPG_TTY"
gpgconf --list-dirs agent-socket agent-ssh-socket
ssh -G github.com | grep -i identityagent