Search code examples
sshserverprivate-key

How to find Private Key Location


I'm trying to access a server using Filezilla and was told I needed to use authentication with public/private keys. I created the keys using the Terminal, but cannot find them on my computer.

This is where the key is located: (/Users/ed/.ssh/id_rsa)

I checked in my home directory, but the folder .ssh is nowhere to be found. Is there a secret place .ssh folder is stored and how can I access it?

My Mac runs on OS X ElCaptain. I would really appreciate any help.


Solution

  • 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.