SSH key fingerprint calculator
Paste an OpenSSH public key to get its SHA256 and MD5 fingerprints as ssh-keygen prints them, with the key type, size and comment, and weak key warnings.
The line from a .pub file, or a whole authorized_keys file. Public keys only; nothing is sent anywhere.
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the SSH key fingerprint calculator
- Paste the line from a .pub file, or a whole authorized_keys file.
- Read the type, the size and the comment of each key.
- Compare the SHA256 fingerprint with the one shown by the server or the service.
- Replace any key the findings mark as weak or deprecated.
About this tool
An SSH key fingerprint is a short hash of a public key. It exists so people can compare keys without reading hundreds of characters: when a server shows its host key the first time you connect, when GitHub lists the keys on your account, when an audit asks which key belongs to whom. Two keys with the same fingerprint are the same key.
OpenSSH prints the SHA-256 hash of the key data in Base64 without padding, as in SHA256:yw9W27Ej..., and that is the format to use. Older versions and some cloud consoles show the MD5 hash as sixteen hex pairs with colons. This tool gives both for each key line, exactly as ssh-keygen -lf does, with the key type, its size in bits and the comment.
It also flags keys that should be retired. DSA keys are limited to 1024 bits and were removed from OpenSSH in version 10.0. RSA keys under 2048 bits are considered within reach of a well-funded attacker. Paste a whole authorized_keys file to see every key at once and find the old ones. Only public keys belong here: if you paste a private key, the tool stops and says so.
Sources
Questions
Run ssh-keygen -lf ~/.ssh/id_ed25519.pub. It prints the size, the SHA256 fingerprint, the comment and the key type. Add -E md5 for the older MD5 form.
MD5 with colons was the original format. OpenSSH 6.8 switched the default to SHA-256 in Base64 because MD5 is broken as a hash. Some consoles still show MD5, so both are useful when comparing.
Yes. The public key is meant to be handed out, and the fingerprint is derived from it. Neither lets anyone sign in. The private key, the file without .pub, is the one that must never be shared.
Ed25519: ssh-keygen -t ed25519. The keys are short, fast and supported by every current server. Where an old system needs RSA, use 3072 bits or more.