- Plug in the Yubikey 5 Nano and fire up the terminal.
gpg2 --edit-card
admin
key-attr
- each "RSA" and "4096"
generate Make off-card backup of encryption key? n
- Type in the USER default PIN: 123456
- Type in your stuff
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
-
Now it will generate some Keys. This will take some time.
-
Set our new SSH Socket (put this into your .bashrc or whatever)
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
- Then we're able to get the public key:
ssh-add -L
- gpg2 --change-pin
- If
gpg2
throws 'gpg: selecting card failed: No such device', do this and try again:
echo 'reader-port Yubico Yubi' >> scdaemon.conf