Where is my keyfile stored in my local drive?

Hey guys,

So, i’m a non technical guy who followed the instructions at 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 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.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.

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.