SSHFP Record
ActiveThe SSHFP (SSH Fingerprint) record stores a fingerprint of an SSH server's public key in DNS.
In one line
The SSHFP (SSH Fingerprint) record stores a fingerprint of an SSH server's public key in DNS. When a client connects via SSH and DNSSEC is active, it can verify the server's host key against the SSHFP record – eliminating the 'authenticity of host can't be established' prompt and protecting against host key spoofing.
Description
SSHFP records store cryptographic fingerprints (SHA-1 or SHA-256 hashes) of SSH host public keys. When an SSH client with VerifyHostKeyDNS enabled connects to a host, it fetches the SSHFP record and compares it to the presented host key. This requires DNSSEC to be valid – an unvalidated SSHFP record provides no security guarantee. The record format encodes the algorithm (RSA=1, DSA=2, ECDSA=3, Ed25519=4) and hash type (SHA-1=1, SHA-256=2).
Examples
example.com. 3600 IN SSHFP 4 2 a87f1b687ac0e57d2a081a2f282672334d90ed316d2b818ca9580ea384d92401ssh-keygen -r example.com
# Output: example.com IN SSHFP 4 1 ...
# example.com IN SSHFP 4 2 ...dig example.com SSHFP +dnssec# ~/.ssh/config
Host example.com
VerifyHostKeyDNS yes