Home
Lookup Tools
Analysis
Bulk & Enterprise
Resources
Close

SSHFP Record Security

The SSHFP record (SSH Fingerprint) publishes SSH host key fingerprints in DNS. When connecting via SSH, the client can verify that the server's key matches the fingerprint in DNS, protecting against man-in-the-middle attacks without manually verifying fingerprints.

Look Up SSHFP Records

Check SSHFP records for any domain using our free DNS lookup tool.

Look Up SSHFP Records →

What Is an SSHFP Record?

When you first connect to an SSH server, you typically see a prompt like:

The authenticity of host 'server.example.com' can't be established.
ED25519 key fingerprint is SHA256:abc123...
Are you sure you want to continue connecting (yes/no)?

SSHFP records let SSH clients automatically verify this fingerprint through DNS, eliminating the need for manual verification and reducing the risk of accepting a compromised key.

DNSSEC Required

SSHFP verification is only secure if the zone is signed with DNSSEC. Without DNSSEC, an attacker could forge SSHFP records.

SSHFP Record Format

Example SSHFP Record

server.example.com.    3600    IN    SSHFP    4 2 abc123def456...

SSHFP Record Fields

Field Description Values
Algorithm Key algorithm type 1=RSA, 2=DSA, 3=ECDSA, 4=Ed25519
Fingerprint Type Hash algorithm 1=SHA-1, 2=SHA-256
Fingerprint Hex-encoded hash Variable length

Algorithm Types

Value Algorithm Status
1 RSA Widely used
2 DSA Deprecated
3 ECDSA Common
4 Ed25519 Recommended
6 Ed448 Supported

Generating SSHFP Records

Use ssh-keygen to generate SSHFP records from your host keys:

# Generate SSHFP records for all host keys
ssh-keygen -r server.example.com

# Output example:
server.example.com IN SSHFP 1 1 abc...  # RSA SHA-1
server.example.com IN SSHFP 1 2 def...  # RSA SHA-256
server.example.com IN SSHFP 4 2 ghi...  # Ed25519 SHA-256

Configuring SSH Client

Enable SSHFP verification in ~/.ssh/config or /etc/ssh/ssh_config:

Host *
    VerifyHostKeyDNS yes       # Verify via SSHFP
    # Or use "ask" to prompt before accepting

With VerifyHostKeyDNS yes, SSH will automatically verify fingerprints via DNS.

SSHFP Best Practices

Example Complete SSHFP Setup

; SSHFP records for server.example.com
server.example.com.    SSHFP    1 2 a1b2c3d4e5f6...  ; RSA SHA-256
server.example.com.    SSHFP    3 2 f6e5d4c3b2a1...  ; ECDSA SHA-256
server.example.com.    SSHFP    4 2 123456789abc...  ; Ed25519 SHA-256

Troubleshooting SSHFP

Common issues and solutions:

Check Your SSHFP Records

Use our DNS Record Finder to look up SSHFP records for any domain.

Look Up SSHFP Records →

Related Record Types