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

While trying to give an host a bit more of security, i decided to switch to SSH key's authentication. To do so i followed this guide, but something makes no sense in my mind.

While the host is the one with the public key, if it is compromised, the attacker would find something like user@host, typed in plain text inside of it's public key, clearly indicating where the private key was made, and probably is.

I mean this:

ssh-keygen -t ecdsa -b 521 -C "$(whoami)@$(hostname)-$(date -I)"

Or to be more precise, this:

"$(whoami)@$(hostname)-$(date -I)"

Why would someone want this information inside of the key?

share|improve this question
What harm does it do exactly? The date information clearly is helpful. Because we are talking about keys that likely are changed rarely if at all knowing who created them might also be useful. An malicious person would not find the information very helpful. – Ramhound Jan 17 '14 at 19:41
@Ramhound - The date may be, but what is the usefulness of knowing which host made the key? – Cláudio Pereira Jan 17 '14 at 19:43
You might be able to go to them in person to have them update it. There might be a document created by that user. The information is not valid without actually access to the network. – Ramhound Jan 17 '14 at 19:47
@Ramhound - Your argument its a valid argument in some very specific cases. But not on mine at least, as i am the creator and a user at the same time. Well thanks for helping, you may post what you said as an answer, I'll accept it ;) – Cláudio Pereira Jan 17 '14 at 19:54
I don't answer questions seeking an opinion – Ramhound Jan 17 '14 at 20:09
up vote 2 down vote accepted

I don't know about "someone", but I know why I want that information. There are servers that carry several public keys from myself - each one from a different "management station" and I want to see from what station I use which key.

Imagine my notebook gets lost. In that case I want to be able to remove just the one line from .ssh/autorized_keys.

share|improve this answer
I didn't knew there could be more than one key at that file. It would not make much sense not to since the name its "keys". Thank you for your answer, you gave me an idea as well ;) – Cláudio Pereira Jan 18 '14 at 8:15
@Claudiop you don't put more than one key on your public key file. You put multiple keys on the .ssh/autorized_keys file, one per line (basically, by pasting the content of various public key files). – That Brazilian Guy Mar 17 '14 at 16:14

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.