Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a public/private key pair:

ssh-keygen -t rsa -C ""

I gave a different key file name than id_rsa since I wanted to create a new separate key from my normal identity.

I gave this key to my hosting provider so that I can login to my server using public key authentication.

I was able to initially login using the key and everything worked.

ssh -i /path/to/key/file

I realized I made a spelling error in the key file name and renamed both the public and private key files. Does this affect anything on the server side if the key file has a different name on my client machine?

share|improve this question
up vote 12 down vote accepted

The filename has no meaning at all, as long as ssh is told where to find it.

(However, if you have the public key extracted to a separate file, then it should have the same filename + .pub as the main file; e.g. mykey &

share|improve this answer
Any idea if it matters whether you change the comment within the .pub file? – jjeaton Jul 18 '14 at 13:50
@jjeaton: It doesn't. – grawity Jul 18 '14 at 14:14
awesome, thanks a lot! – jjeaton Jul 18 '14 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.