How to find Private Key Location

(MacOS) I my case, .ssh folder was hidden so I went to folder route (example /Users/syed.dastagir)and pressed Command + Shift + . (full stop/period) and it showed me .ssh folder.

When you no longer want to see the hidden folders just press Command + Shift + . again.


Files and folders starting with a period (.ssh) are hidden by default. To find private/public key, run this commands:

ls -a

In your case, run this commands to find the ssh keys:

cd ~/.ssh

then:

ls -a

Now you should see the keys like this:

.       ..      id_rsa      id_rsa.pub

If the keys are not there then definitely you need to create the key by ssh-keygen command.