> 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/quickstart/4.-enrolling-the-public-key-to-key9.md).

# 4. Enrolling the public key to Key9

\*\* NOTE: If your Yubikey is already enrolled with Key9, you can skip these steps!

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 /opt/homebrew/lib/libykcs11.dylib -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.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXerEZzONbW-OAPUyLzBE_cliLzWeCrS3_dyrnkrad6fduWA8Cbc3RdcwhQhX6MCX6z1JjLODmqI62dHEWKu_fOxctIXcXWni867G2q_D1nfQhLcwctOHrbxjaf7PSSuIxUQ-RioX63bOnv9SrulFRqK3Iox?key=gNhivzMZ8qTn-usg5b_RDA" alt=""><figcaption><p>Adding a new key to Key9</p></figcaption></figure>
