The principal purpose behind this repo is to automate the setup of a linux environment to enable Yubikey (version 4 or later) to be used as a hardware token for SSH authentication.
- Ubuntu 18.04
- Test on Debian
- Test on older OS variants
- Port to
zsh
instead of justbash
- Yubikey 4+
- setup the Yubikey's GPG slot with signing, encryption, and authentication keys
- publish your public GPG keys to
keys.gnupg.net
or other public GPG service (this is also covered by the blog post)
bash install_gnupg.sh <e-mail address>
How to remove specific ssh keys from keyring:
ssh-add -L
ssh-add -E md5 -l
gpg-connect-agent 'keyinfo --ssh-list --ssh-fpr'
then remove the appropriate entry from ~/.gnupg/sshcontrol
remove the file in ~/.gnupg/private-keys-v1.d/
Host <remote machine name>
RemoteForward /run/user/<remote user id>/gnupg/S.gpg-agent /run/user/<local user id>/gnupg/S.gpg-agent.extra
RemoteForward /run/user/<remote user id>/gnupg/S.gpg-agent.ssh /run/user/<local user id>/gnupg/S.gpg-agent.ssh
Add the following:
StreamLocalBindUnlink yes