Where is my private key?

I was following this tutorial to generate and assign a key to one of my servers, but before running ssh-copy-id -i ~/.ssh/mykey user@host I was tring to find my private key and guess what I can't find it. :x

Sorry if this is recurring question but I've check this before but I can't get any answer to my question.


So, I've run ssh-keygen then tried cat ~/.ssh/id_rsa/mykeynamebut there's no key.
Also ls ~/.ssh -a only shows the known_hosts file.

But I can see the public key in my home folder. mykey.pub

I'm kinda new to the ssh authentication process so I would love some help or if the case some link to another question ( I'll delete this question if needed).

Thanks in advance.

9

1 Answer

IF you followed that tutorial exactly i.e. answered mykey at the prompt

Enter file in which to save the key (/home/ylo/.ssh/id_rsa):

then it will be in a file called mykey in your current directory.

If you want it to be in the default location ~/.ssh/id_rsa then simply hit Enter at that prompt to accept the default value.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like