Skip to content

How do I verify my server's SSH fingerprint?

The first time you connect to a server over SSH, your client shows the server’s host key fingerprint and asks you to confirm it:

The authenticity of host 'lon002.arandomserver.com (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:abcdef0123456789...
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Blindly accepting this prompt leaves you open to a man-in-the-middle (MITM) attack. To be safe, you need to compare the fingerprint against a known source. We publish our servers fingerprints publicly via SSHFP DNS records, which can be used to automatically or manually verify your SSH/SFTP connections upon connecting.

Want to look up your server's SSHFP record? Use the built-in lookup tool on this page — no software to install. Open the tool

Every SSH server has multiple host keys (one for each offered algorithm), which includes a public & private key pair. The fingerprint is a short hash of the public key being offered by the server. By comparing the fingerprint of the public key being offered to a known trusted value tells you whether you’re talking directly with the server, or if there is something standing in the middle.

There are two primary ways to get a hosts SSH/SFTP host key fingerprint:

  1. When you first connect to a servers SSH/SFTP server, your client will offer a fingerprint of the servers public key and ask if you would like to trust it. Compare this fingerprint with a trusted value (EX, our SSHFP DNS records).

  2. By ssh-keyscan & ssh-keygen you can retrieve a servers host public key and convert it to a fingerprint.

ssh-keyscan -t ed25519,rsa lon002.arandomserver.com | ssh-keygen -lf -

SSHFP (SSH Fingerprint) records publish a server’s host key fingerprints in DNS. Because they’re retrieved from the DNS system rather than over your SSH connection, they give you an independent reference to check against. There are two ways to use them:

  1. Automatically — tell your SSH client to look them up and do the comparison for you.
  2. Manually — look the record up yourself with dig or using the the tool below.

Either way, protection is strongest when the server’s domain is signed with DNSSEC, which cryptographically guarantees the DNS answer itself wasn’t tampered with.

Method 1: Let your SSH client verify DNS automatically

Section titled “Method 1: Let your SSH client verify DNS automatically”

Ask SSH to verify the host key against DNS when you connect:

Terminal window
ssh -o VerifyHostKeyDNS=yes lon002.arandomserver.com

If a matching, DNSSEC-validated SSHFP record is found, SSH accepts the host key automatically without showing the usual “are you sure you want to continue connecting?” prompt.

To make this the default for every connection, add it to your ~/.ssh/config:

Host *
VerifyHostKeyDNS yes

Method 2: Look up the SSHFP record manually

Section titled “Method 2: Look up the SSHFP record manually”

If you’d rather inspect the record yourself — for example to confirm it exists, or to check it from a different, trusted network before you first connect — you can query DNS directly.

The quickest option — including on Windows — is to look the records up right here in your browser (this uses DNS-over-HTTPS, so it works without any tools installed):

With DNSSEC (recommended) — request DNSSEC data and confirm the answer was signed & authenticated (Hawk Host customers use this method):

Terminal window
dig +dnssec SSHFP lon002.arandomserver.com

Look at the flags line in the output. If it includes ad (Authenticated Data), your resolver validated the DNSSEC signatures and the record can be trusted:

;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, ...
lon002.arandomserver.com. 3600 IN SSHFP 4 2 abcdef0123456789...

Without DNSSEC - you can still retrieve the record, but this is not signed, and therefore there is no guarantee this is not spoofed.

Terminal window
dig +short SSHFP lon002.arandomserver.com
1 2 BDFF07413D77DEB077320097B35D05BB7F8B8EC3C8EB291962718472 16AA59D7
3 2 15A48EB5C8848A2963AAF8CDC598B110D7FB18B2FE7474935B22C6E2 AFEF27A5
4 2 9A0A28F191FA774AA47622CE2C748CF2A6EE11FAC7D4343145123493 13D96AD7

Windows’ built-in tools cannot query SSHFP records (DNS record type 44) — neither nslookup nor PowerShell’s Resolve-DnsName support them. The easiest path on Windows is the in-browser lookup tool above.

If you’d prefer a command line, run dig from WSL (Windows Subsystem for Linux) or manually check using the form below:

The interactive SSH prompt shows the fingerprint as SHA256: followed by a base64 string, while the SSHFP record stores it as hexadecimal — so the two aren’t meant to be compared by eye. Instead, once you’ve confirmed an authentic record exists in DNS, let SSH do the byte-for-byte comparison for you:

Terminal window
ssh -o VerifyHostKeyDNS=yes lon002.arandomserver.com

If the key the server presents matches the SSHFP record, SSH reports “Matching host key fingerprint found in DNS” without prompting you, confirming you’ve reached the genuine server.

If you have trouble verifying your server’s fingerprint, please submit a support ticket and our team will be happy to help.