# 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`](mailto:user@remote.example.com)

If successful, you see something like the following

`Enter PIN for 'YubiKey PIV #24253382':`

<figure><img src="https://2354768316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZbcN0W0VyihswJIdHDaE%2Fuploads%2FXNBNfQzeZ2G6wV2IA8n7%2Fimage.png?alt=media&#x26;token=3d4a203e-2dc7-4585-9a44-cc83515fe863" alt=""><figcaption><p>Testing the key</p></figcaption></figure>

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`
