SSH key fingerprint and converter
Runs in your browserGet SHA256 and MD5 fingerprints of SSH public keys like ssh-keygen -l, see the randomart, convert to PEM, RFC 4716 or JWK, and check hashed known_hosts lines.
Private keys work too: the fingerprint is read from the public part without the passphrase. Better: ssh-keygen -y -f key.
Paste one or more keys. You get the fingerprint exactly as ssh-keygen -l shows it, the randomart, and the key as PEM, RFC 4716 and JWK.
Hashed known_hosts lines hide the host name. Enter a host name to find the lines that belong to it, like ssh-keygen -F host. Try the example with github.com, or git.example.org and port 2222.
What ssh shows when you connect
“The authenticity of host … can’t be established. ED25519 key fingerprint is SHA256:…” The fingerprint is the SHA-256 of the key, written in Base64 without padding. Compare it with the one the server owner publishes (GitHub, GitLab and Bitbucket list theirs in their docs) before you type yes. Older tools show MD5 in hex with colons; both identify the same key.
The same with ssh-keygen
ssh-keygen -lf ~/.ssh/id_ed25519.pub # SHA256 ssh-keygen -E md5 -lf ~/.ssh/id_ed25519.pub # MD5 ssh-keygen -lvf ~/.ssh/id_ed25519.pub # with randomart
ssh-keyscan github.com 2>/dev/null | ssh-keygen -lf - ssh-keygen -F github.com # find it in known_hosts, hashed or not
ssh-keygen -e -f key.pub # RFC 4716 (SSH2, PuTTY, Tectia) ssh-keygen -e -m PKCS8 -f key.pub # PEM (RSA, ECDSA) ssh-keygen -i -m PKCS8 -f public.pem # PEM to OpenSSH ssh-keygen -y -f ~/.ssh/id_ed25519 # public key from the private key
Keys that cause trouble
OpenSSH refuses RSA keys shorter than 1024 bit and many services shorter than 2048. Use Ed25519 for new keys.
OpenSSH 8.8 disabled RSA signatures with SHA-1. The key can stay; client and server need to use rsa-sha2-256 or rsa-sha2-512.
ssh-dss is disabled by default since OpenSSH 7.0 and removed in OpenSSH 10. Replace such keys.
An authorized_keys entry must be one single line. Copying from a terminal can split it.
Questions about the SSH key fingerprint
How do I get the fingerprint of an SSH key?
ssh-keygen -lf key.pub, or paste the key above. The output is the same: bits, SHA256 fingerprint, comment and type.
Why does GitHub show a different fingerprint than my terminal?
Usually it doesn’t: GitHub shows SHA256 fingerprints like ssh-keygen. Old tools show MD5. The tool shows both. If they really differ, it is a different key.
Can I paste my private key?
It works and stays in your browser, but you don’t need to: the public key file (.pub) or ssh-keygen -y -f key gives the same fingerprint.
What is randomart?
A small picture drawn from the fingerprint (“drunken bishop”), so a changed key is easier to spot by eye. The tool draws it exactly like ssh-keygen -lv.