Setup: Gpg Dongle
Host * IdentityFile ~/.ssh/id_rsa_gpg.pub IdentitiesOnly yes Enable SSH agent forwarding in ~/.gnupg/gpg-agent.conf :
ssh -T git@github.com # Should prompt for PIN then authenticate Sign a file gpg --sign document.txt # Prompts for PIN on the dongle Decrypt a file gpg --decrypt secret.gpg List keys on card gpg --card-status Change PIN gpg --card-edit gpg/card> admin gpg/card> passwd Step 7: Backup & Recovery Critical : Backup your revocation certificate immediately: gpg dongle setup
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) Test SSH: Host * IdentityFile ~/
gpg --card-status Expected output shows: gpg dongle setup
sudo apt install gnupg gnupg-agent pcscd scdaemon (Homebrew):
brew install gnupg ykman pinentry-mac :
sudo systemctl restart pcscd Edit ~/.gnupg/scdaemon.conf :