SSHFP record generator: how do you publish SSH host key fingerprints in DNS?
How does this check work, and what does the result tell you?
AdminKit's SSHFP record generator turns the OpenSSH public host keys you paste into RFC 4255 SSHFP records with SHA-256 fingerprints, the same lines ssh-keygen -r prints, plus the name/value split DNS panels ask for. It runs entirely in your browser: nothing is sent to any server, and private keys are refused.
Part of the DNS cluster — more tools, guides and terms on dns.
The name you type after ssh, e.g. host.example.com.
Your domain at the DNS host; used only to show the short Name panels ask for.
Paste /etc/ssh/ssh_host_*_key.pub lines. Public keys only: never paste a file without .pub.
Built entirely in your browser — nothing you paste is sent to AdminKit or any other server, and this tool does no DNS lookup.
Line 1: ssh-ed25519 — SSHFP algorithm 4 (Ed25519, RFC 7479)
SSHFP only helps when the zone is DNSSEC-signed and the SSH client has VerifyHostKeyDNS turned on. Publish the records at your DNS host, then check them with dig -t SSHFP and your host name.
What the result means
Each zone-file line is one SSHFP record: the SSHFP algorithm number of the key, the fingerprint type (2 for SHA-256), and the hex fingerprint of the public key. The name and value fields are the same record split the way most DNS hosting panels ask for it.
Next step
Publish the records at your DNS host and make sure the zone is DNSSEC-signed, then check the zone with AdminKit's DNSSEC check. SSH clients only use the records when VerifyHostKeyDNS is turned on.
Keep this result
Copy a link to this check so you can share it or run it again later. Want a heads-up when this result changes? Talk to our team and we'll set it up for you.
How it works and limits
Type the host name your users connect to, paste one or more OpenSSH public host keys, and this tool builds the
SSHFP records as you type, entirely in your browser — nothing you paste is sent to AdminKit or any other server,
and no DNS query is made. For each key it shows the zone-file line and the name and value boxes most DNS hosting
panels ask for. Building the records changes nothing by itself: publish them at your DNS host, sign the zone with
DNSSEC, and turn on VerifyHostKeyDNS in your SSH clients.
What is an SSHFP record for?
The first time an SSH client connects to a server, it is shown the server’s host key fingerprint and asked whether
to trust it. Most people type yes without checking, which is exactly the moment a machine-in-the-middle would
present its own key. RFC 4255 defines the SSHFP record so the server’s
owner can publish the fingerprint in DNS instead, and the client can compare the key it receives with the one in
DNS. The OpenSSH ssh(1) manual describes this as verifying host keys by DNS: add the
SSHFP records to the zone, check them with dig, then connect with the VerifyHostKeyDNS option.
The record data is three fields: an algorithm number for the key type, a fingerprint type for the hash, and the
fingerprint in hex. The fingerprint is a hash of the binary public key blob, the base64 part of a .pub line after
decoding, not of the whole text line:
host.example.com. IN SSHFP <algorithm> <fingerprint type> <fingerprint>
When does SSHFP actually protect a connection?
Only when two things are true, and the tool cannot check either of them for you.
- The zone is DNSSEC-signed. RFC 4255 relies on DNSSEC to show that the fingerprint really came from the
zone’s owner. The ssh_config(5) manual says that with
VerifyHostKeyDNS yesthe client implicitly trusts keys that match a secure fingerprint from DNS, and handles insecure fingerprints as if the option were set toask. Amazon’s Route 53 record types guide puts it plainly too: SSHFP records must be secured with DNSSEC for a chain of trust to be established. - The client asks for it.
VerifyHostKeyDNSdefaults tono, so OpenSSH ignores SSHFP records until you set it toyesorask, per connection or inssh_config:
ssh -o VerifyHostKeyDNS=yes host.example.com
With ask, OpenSSH reports that a matching fingerprint was found in DNS but still asks you to confirm the key.
AdminKit’s DNSSEC check shows whether a domain’s zone is signed and whether the signature
chain validates, which is the first condition above.
Which algorithm and fingerprint numbers are used?
The algorithm number comes from the key type in the .pub line. RFC 4255 assigned 1 to RSA and 2 to DSA,
RFC 6594 added 3 for ECDSA, RFC 7479
added 4 for Ed25519, and RFC 8709 added 6 for Ed448.
Key type in the .pub line | SSHFP algorithm |
|---|---|
ssh-rsa | 1 (RSA) |
ssh-dss | 2 (DSA) |
ecdsa-sha2-nistp256, -nistp384, -nistp521 | 3 (ECDSA) |
ssh-ed25519 | 4 (Ed25519) |
ssh-ed448 | 6 (Ed448) |
The fingerprint type is the hash: 1 is SHA-1 from RFC 4255, and 2 is SHA-256 from RFC 6594. RFC 6594 says clients that support SHA-256 must prefer it when both are published, so this tool outputs type 2 and only adds type 1 when you tick the legacy option. DSA host keys still get algorithm 2, with a warning: the OpenSSH 7.0 release notes say ssh-dss host and user keys are disabled by default at run time from that release on.
How do I get the same lines with ssh-keygen?
On the server, ssh-keygen -r prints the SSHFP records for a public key file, as the
ssh-keygen(1) manual describes. Give it the host name with a trailing dot so
the owner name is fully qualified:
ssh-keygen -r host.example.com. -f /etc/ssh/ssh_host_ed25519_key.pub
It prints a type 1 and a type 2 line for each key. For the example Ed25519 key this tool starts with, the type 2 line from OpenSSH 9.2 and the line this tool builds are identical:
host.example.com. IN SSHFP 4 2 102f2e013a286640ab052e68ee5c16b796893621a19ba96f0149e2b5caf8606b
If you leave the trailing dot off, ssh-keygen prints the name as you typed it, and a zone file reads a name
without a dot as relative to the zone’s origin. This tool always writes the full name with a dot in the zone-file
line.
How do DNS panels want the record split?
Most hosting panels ask for a name and a value rather than a zone-file line. Google’s Cloud DNS record types overview describes SSHFP data as one string of algorithm number, fingerprint type and fingerprint, and Route 53 uses the same algorithm–hash type–fingerprint order. The tool shows:
- Zone-file lines — every record at once, for a BIND-style zone file.
- Name / Host — the host relative to the zone you enter (for example
host, or@for the zone apex), or the full name with a trailing dot if you leave the zone empty or it does not match. - Value — algorithm, fingerprint type and fingerprint for each key, one record per key.
Publish one SSHFP record per host key under the same name. A server usually has an Ed25519, an ECDSA and an RSA host key; publish all of them, because the client may negotiate any of them.
How to read the results
- Errors (red, no output) — no host name, an IP address instead of a name, or no usable key line.
- Line errors (red, other keys still shown) — a line with malformed base64, a key blob that does not match its
type label, an unknown key type, a security-key (
sk-) type or an OpenSSH certificate. - Private key warning — anything that looks like a private key, such as a BEGIN … PRIVATE KEY block or a
PuTTY key file, is refused as a whole and none of it is shown back. Paste only
.pubfiles. - Warnings (amber) — the legacy SHA-1 option is on, a DSA key was pasted, or the same key appears twice.
Lines in ssh-keyscan output (host type key) and # comment lines are accepted too, but fingerprints taken over
the network are only as trustworthy as the connection they came over; copy the .pub files from the server itself
when you can.
Limits
- This tool only builds text. It never queries DNS and never publishes anything, so it cannot tell you whether the
records exist, whether the zone is signed, or whether they match the keys the server presents today. AdminKit’s
DNS lookup does not query SSHFP records; use
dig -t SSHFPwith your host name instead. - Rotating a host key means updating the SSHFP records too; a stale record makes clients with
VerifyHostKeyDNSreport a mismatch. - It does not read files from your computer. Open the
.pubfile and paste its contents.
Reference: DNSSEC for the plain-language definition. This tool is part of AdminKit’s DNS cluster, next to the SRV record generator and the CAA record generator.
Frequently asked questions
Does this tool send my keys to AdminKit or anywhere else?
No. The keys and host name are read by your browser and the fingerprints are computed there with plain JavaScript; nothing you paste is sent to AdminKit or any other server, and the tool does no DNS lookup. Public host keys are not secret anyway, but the tool still keeps them on your device.
What happens if I paste a private key by mistake?
The tool refuses the whole input, shows a warning, and does not display any of what you pasted. A private key file has no .pub at the end of its name and starts with a BEGIN ... PRIVATE KEY line. If you pasted one anywhere else, such as a chat or a ticket, treat it as exposed and replace the host key.
Do SSH clients use SSHFP records automatically?
No. OpenSSH only looks the records up when the client option VerifyHostKeyDNS is set to yes or ask; its default is no. With yes, the ssh_config manual says the client trusts keys that match a secure fingerprint from DNS, so the zone must be DNSSEC-signed; insecure fingerprints are handled as if the option were ask.
Should I publish fingerprint type 1 (SHA-1) as well as type 2 (SHA-256)?
Usually not. RFC 6594 added SHA-256 as fingerprint type 2 and says clients that support it must prefer it when both are present. The tool outputs type 2 by default and adds type 1 only if you tick the legacy option, for example for an old client that only understands SHA-1.
Which key types are supported?
ssh-rsa (SSHFP algorithm 1), ssh-dss (2), ecdsa-sha2-nistp256, nistp384 and nistp521 (3), ssh-ed25519 (4) and ssh-ed448 (6). Security-key types (sk-...) and OpenSSH certificates have no SSHFP algorithm number, so the tool rejects them; publish the plain host keys from /etc/ssh instead.