0

I tried ssh-ing to a server that uses RSA verification. I was already able to ssh to this server months back but I find out that I can't do so today.

I investigated the keys in my computer. I emailed my public key to the server's owner months back and I see that my attachment and my id_rsa.pub still matches. Next, I tried generating the public key for the private key currently in my computer.

.ssh$ ssh-keygen -y -f id_rsa > ~/Documents/public_key.txt
Enter passphrase:

Then, I diff it to the one I sent over email months back.

Documents$ diff public_key.txt attach_public_key.txt 
1c1
...

Upon visual inspection, it seems that the only difference is that attach_public_key.txt has my email address appended at the end. I then validate my hunch...

Documents$ cp rsa_public_key.txt noemail_public_key.txt
Documents$ vi noemail_public_key.txt # remove email add here
Documents$ diff public_key.txt noemail_public_key.txt
Documents$

Voila!

So, how come my private key no longer requires my email address on the matching public key? What should I do to be able to ssh to the server again? Should I tell the admin that my key was modified (isn't this alarming?) ? Or is there a way for me to tweak my local keys?

1 Answer 1

1

Your email address on your .pub is only a comment, and could be anything.
It's point is to help you tell multiple key's apart in you ~/.authorized_keys file, and not strictly necessary for a key to work.

I would also suggest ssh-copy-id in the future, instead of email.

1
  • Thanks. I guess this just calls for a follow-up question.
    – skytreader
    Jun 1, 2013 at 17:46

Your Answer

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

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