How do I access my SSH public key? How do I access my SSH public key? git git

How do I access my SSH public key?


cat ~/.ssh/id_rsa.pub or cat ~/.ssh/id_dsa.pub

You can list all the public keys you have by doing:

$ ls ~/.ssh/*.pub


Copy the key to your clipboard.

$ pbcopy < ~/.ssh/id_rsa.pub# Copies the contents of the id_rsa.pub file to your clipboard

Warning: it's important to copy the key exactly without addingnewlines or whitespace. Thankfully the pbcopy command makes it easy toperform this setup perfectly.

and paste it wherever you need.

More details on the process, check: Generating SSH Keys.


You may try to run the following command to show your RSA fingerprint:

ssh-agent sh -c 'ssh-add; ssh-add -l'

or public key:

ssh-agent sh -c 'ssh-add; ssh-add -L'

If you've the message: 'The agent has no identities.', then you've to generate your RSA key by ssh-keygen first.