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

In a public key file "" generated by ssh-keygen, does the part after the == matter?

I ask because when I changed "" to "root", it seems to still work.

More generally, I am curious about what the purpose of that half is.

share|improve this question
up vote 20 down vote accepted

This right part of a public key (either "" or "") is just a comment and is usually filled with the < login>@< hostname> who generated the key. This in a way similar to the comment field from the SSH Public Key File Format (see RFC 4716).

So, as being purely informational and optional, you can change it to whatever you like, but keeping the < login>@< hostname> is a practical way to keep track of what is what.

share|improve this answer
Is there an RFC or similar document for this format as well? I've seen other funny things in these authorized_keys files as well, such as actual commands. – merlin2011 Dec 9 '12 at 9:53
This format seems openssh specific... but one of the most widely used. You can find some info about it in the openssh sshd manpage, in the "AUTHORIZED_KEYS FILE FORMAT" section. – Ouki Dec 9 '12 at 10:02

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.