I've just generated my RSA key pair, and I wanted to add that key to GitHub.
I tried cd id_rsa.pub
and id_rsa.pub
, but no luck. How can I access my SSH public key?
I've just generated my RSA key pair, and I wanted to add that key to GitHub.
I tried cd id_rsa.pub
and id_rsa.pub
, but no luck. How can I access my SSH public key?
Here's how I found mine on OS X:
cd .ssh
(a hidden directory)If that doesn't work, do an
ls
and see what files are in there with a.pub
extension.The following command will save the SSH key on the clipboard. You only need to paste at the desired location.
You may try to run the following command to show your RSA fingerprint:
or public key:
If you've the message: 'The agent has no identities.', then you've to generate your RSA key by
ssh-keygen
first.After you generate your SSH key you can do:
which will copy your ssh key into your clipboard.
On terminal
cat ~/.ssh/id_rsa.pub
explanation
It can be found on this path (default path):
john
is your Mac username.