ssh-keygen - how to set an rsa key with a certain username

George Mauer picture George Mauer · Jun 29, 2011 · Viewed 22.1k times · Source

I just installed ubuntu and would like to set its rsa keys up with bitbucket/github. When I ssh-keygen the keys are generated as they should be

ssh-rsa AA...yBEz3pLL georgemauer@ubuntu

which is perfectly usable except the username part. In every rsa key I've generated previously, the username section read my email address:

ssh-rsa AA...yBEz3pLL [email protected]

No, it's not a major impediment but if I don't get this right it will drive me crazy. How, do I generate with rsa keys with an email username of my choice?

Answer

datasage picture datasage · Jun 29, 2011

Use the -C option to provide a new comment with your key.