Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

When you ssh into a remote box for the first time or if the remote host's key fingerprint has changed (from what's stored in your known_hosts file) you get a warning and you are shown the fingerprint of the host's key.

Does it compromise your security if you share the fingerprint publicly (i.e. with potential attackers)? Or is this a case where it's okay for everyone to know the fingerprint of a server, because ssh is doing something behind the scenes (from my perspective as a simple user) such that the fingerprint can't be spoofed, even if it's known?

Since you can see the fingerprint just by attempting to ssh in to the server using a nonsense account, I assume that means the fingerprint should be okay to be publicly shared (but you know what happens when you assume...).

share|improve this question

2 Answers 2

up vote 9 down vote accepted

The server key fingerprint is a hash of the server's public key, which is, by definition, public. Anybody can obtain the server's public key by simply connecting to it, since the server sends its public key in the initial steps of the protocol. In fact, that's just what you do with your SSH client: you connect to the server, the server sends its public key, your SSH client software computes the key hash (the fingerprint) and displays it. At that point, you still have not authenticated yourself, so everything you did, anybody could have done it.

Thus, there is no problem is publishing the key fingerprint because any possible attacker already has it.

Of course, publishing the key fingerprint and using it as a basis for server authentication requires robust publication: an industrious attacker intent on doing Man-in-the-Middle attacks would try to alter the published fingerprint as you see it, so as to induce you into accepting as genuine a fake server key. Thus, if you publish the server's public key on a Web site, make it an HTTPS Web site. (In other words, for this fingerprint, you do not need confidentiality but you need integrity.)

share|improve this answer

Yes, the fingerprint is merely a hash of the public key, used to authenticate it. An adversary would require the private key to decrypt your messages. Getting the private key from the information available would require:

  1. A hash function which is not preimage-resistant (some might not consider that a real hash function).
  2. RSA is broken

Wikipedia shows public key fingerprints here.

It's a fair question, though, SSH does not say that it is the public key's fingerprint.

share|improve this answer
3  
3. A lousy RNG. See debian.org/security/2008/dsa-1571 and threatpost.com/en_us/blogs/… –  Jeff Ferland Oct 25 '12 at 8:29
    
Wow. Fair point! –  Henning Klevjer Oct 25 '12 at 8:31

Your Answer

 
discard

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.