2

When connecting to a host through SSH for the first time I get met with the message: Authenticity of host ***** can't be established. ECDSA key fingerprint is SHA256 *******. Are you sure you want to continue to connect? (yes/no/[fingerprint]).

I'm trying to understand a safe way for a client to verify a host's fingerprint.

When connecting with SSH, a client recieves the fingerprint, but for the client to be able to verify that the fingerprint indeed belongs to the host, the host should also share that fingerprint in another channel.

What standards does the security community use for securely sharing fingerprints?

3 Answers 3

6

RFC2455 Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints defines a SSHFP DNS record to store the public key of a SSH server. RFC6594 extends this. It makes sense to use this when DNSSEC is used.

OpenSSH has support for checking the SSH public key using SSHFP (VerifyHostKeyDNS) but it does not do any DNSSEC verification (as far as I known). When used, you should use a resolver which handles this for you: this should ideally be a local resolver or trusted remote resolver if you are communicating with it over a secure channel (DoT, DoH, etc.). Looking at the code, OpenSSH will only trust SSHFP records if the DNS response has the AD (Authenticated Data) bit set.

1
2

There is a provisional registration for the Well-known URI sshfp listed at iana.org, which should enable fingerprint distribution over https from a web server for the same domain.

I have failed to find any actual existing implementations, not even any prototypes. Furthermore, it appears the registration is too brief to be close to adoption. One thing which has been raised, but to the best of my understanding is not sufficiently documented, is if and how fingerprints for ssh servers of subdomains are to be handled. edit: I somehow failed to notice the surrounding hosts dictionary upon initial reading.

1
  • The homepage shows an example, but I haven't found any big sites with one. You'd expect the big Git hosts to publish their keys if this was in wide use. Apr 26 at 14:03
0

I doubt there's a formalized standard for this, because the methods which are suitable depend entirely on the context and security requirements. If it's a server intended for personal use, there will be different procedures than, say, in a large company with its own administrators.

There are many possible ways.

  • The fingerprint could be made available through an administration GUI.
  • You could call whoever is responsible for the server and ask them to read the fingerprint out loud.
  • You could ask for a signed mail containing the fingerprint.
  • If possible, you could ask for a personal meeting to write down the fingerprint.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .