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


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:

and have generated the key named ( 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,



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/ ~/ 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