Purpose of email at the end of SSH public key
I was adding one of my public keys to the authorized_keys
on one of my servers when I realized that at the end of my public SSH key there is my email:
$ cat .ssh/id_rsa.pub
ssh-rsa AAAA[...lots of characters...]bpL [email protected]
- Why is my email address at the end of the key?
- Does it have any specific purpose?
-
Can I write anything I want in my
authorized_keys
file? Like for instance:ssh-rsa AAAA[...lots of characters...]bpL John Doe (Home PC)
-
Most likely to identify who created the key.
-
It is just a comment. But as said at 1: probably so you know you created it. Useful when more than 1 administrator is administrating the system.
-
Yes, you can add anything in place of your e-mail. And since it is the last part of it you do not have to use anything special for spaces etc.
Extra:
ssh-keygen -c
to change it for RSA1 keys (only works for RSA1).