How to view existing SSH keys on Mac - Brown Surfing

How to view existing SSH keys on Mac

Posted on: September 19th, 2022
By: Efrain Lemus

This will list all the SSH keys (if you have more than one)

ls -al ~/.ssh

Here’s how to view the content of the SSH key

cat ~/.ssh/id_rsa.pub

To generate a new key. Add a password so the key works with GitHub. Here’s how to add the key to GitHub.

ssh-keygen

I’m unsure if this is needed, but run these two commands to set your agent. Most likely the name of key is id_rsa but if it isn’t make sure to update to the proper name.

eval "$(ssh-agent -s)"

ssh-add ~/.ssh/id_rsa

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *