8 points · by kator · 14y ago · 4 comments
Consider the threat environment: I have a laptop with a private/public key pair that gets me my main login on all services I run. It is possible that Server #1 can get compromised, immediately compromising the public key on it. I do not desire Server #2 to get compromised. No problem -- with only the public key, they can't compute my private key. Also, when I authenticate with them, I don't have to divulge my private key -- we can play a little game over the wire and my system provides an answer which would have been computationally unfeasible to calculate without having my private key handy.
There might be some minor data leakage if you name your keys something descriptive. Mine are typically no more sensitive than email addresses.
If the authorized_keys file is published, they immediately know which private keys are useful for remote logins.
If the authorized_keys file contains source-machine names and usernames in the comment, it gives the hackers a list of your other machines to attempt compromising to obtain the private keys.
If the authorized_keys file uses from="address" restrictions, publishing it gives the hackers a list of allowed source networks for remote logins. If they try to log in with the correct private key from the wrong network, they are denied access (and may assume the key is invalid).
In summary, it's technically not a security risk, but there is no reason to publish it and make life easier for hackers if they do happen to stumble on one of your private keys.
Not sure what others think?