Generated public rsa key on mac for use with git, but can't locate it?

Issue

I’m on mac os X (new to it) and need to generate a public rsa key for use with git (think I got that right). I’m following the directions here:

http://help.beanstalkapp.com/faqs/git/generating-and-adding-ssh-keys-on-mac-os-x

and have generated the key named (id_rsa.pub) in my home directory, but I don’t see it there when I do ls, or when I view through the file explorer gui. Is it like a hidden file or something? How can I see it? I need to email the public key to someone,

Thanks

Solution

By default it stores the key in the ~/.ssh directory, which is hidden.
All directories that start with a period are hidden, but can be seen either by directly naming them or by specifying the ., as in:

ls .*

So to get a copy, you can type cp ~/.ssh/id_rsa.pub ~/ and it’ll appear in your home directory.

Answered By – jasedit

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published