5. Testing and configuring SSH

To test your new key, please issue the following command:

$ ssh -I /opt/homebrew/lib/libykcs11.dylib user@remote.example.com

If successful, you see something like the following

Enter PIN for 'YubiKey PIV #24253382':

The PIN will be the same PIN you setup in the “Yubikey Manager”

If the connection is successful, you can add the key to ssh-agent (optional) by executing

$ ssh-add -s /opt/homebrew/lib/libykcs11.dylib

If you are not using an ssh-agent, add the following to your $HOME/.ssh/config file:

PKCS11Provider /opt/homebrew/lib/libykcs11.dylib

Last updated