> For the complete documentation index, see [llms.txt](https://docs.k9.io/key9-identity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.k9.io/key9-identity/ssh/installation-and-setup/windows-yubikey-smartcard-piv-instructions/5.-enrolling-the-public-key-to-key9.md).

# 5. Enrolling the public key to Key9

You need to obtain the public key, which will be the SSH public key that you copy/paste to Key9. To get the public key, run:

`ssh-keygen -D "C:\Program Files\Yubico\Yubico PIV Tool\bin\libykcs11.dll" -e`

This will return two public keys. *Copy and paste the <mark style="color:yellow;">first public key</mark> into the Key9* "PUBLIC KEY" field in the SSH section of your account.&#x20;

Login into Key9 and in the top right corner will be your name with a “pull down” menu option.  Pull that down and go to “My Profile”.  Once in your profile,  select “Add SSH Key” (right of “SSH Keys”).&#x20;

Give your new key a name and copy/paste the public key.
