Where is my keyfile stored in my local drive?

May 15, 2016 393 views

Hey guys,

So, i'm a non technical guy who followed the instructions at https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 to generate both public and private key with the default file path.

Then, tried to setup FileZilla to connect to my server using SFTP via instructions at https://www.digitalocean.com/community/tutorials/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps where I then couldn't find the key file apparently stored somewhere locally on my hard drive? I even tried to search on my local HD with id_rsa

Thanks in advanced for the help.

2 Answers

A better method of transferring your keys is to use ssh-copy-id.

Once you generate your keys (ssh-keygen -t rsa -b 4096), fun the following command.

ssh-copy-id user@ip-address

the "ip-address" reference above is the ip of the box that you want to ssh into.

Sorry, to answer your original question, your key files are stored in /home/user/.ssh.

If you issued the ssh-keygen using sudo or root, the key files are in /root/.ssh.

Have another answer? Share your knowledge.