DevTools Logo

SSH Public Key Inspector

SSH Public Key Inspector

Decode an OpenSSH public key locally: type, bit length, options and ssh-keygen-compatible fingerprints.

Runs in your browser
Try an example

Public key

Inspection

Paste a public key to see what is inside it

OpenSSH one-liners, RFC4716 blocks and bare base64 blobs are supported. Nothing is uploaded or stored.

Details

This inspector reads public keys already in use — keys in authorized_keys, CI deploy keys or git provider settings. It decodes the RFC 4251 wire blob in your browser, reports the algorithm, bit length, comment and leading options, and computes the same SHA-256, MD5, SHA-1 and SHA-512 fingerprints as ssh-keygen -lf. RFC4716 (SSH2) blocks are converted to a one-liner, two keys can be compared, and private keys are rejected outright. Nothing is uploaded or stored.

More examples

Verify a deploy key

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZelCmxQhwx54vm3wJXXFaSoJRKzg6l8tlesPWV19ht deploy@ci
→ 256 bits · SHA256:ia2yGMNcQtvSfO6sRavTDism6FC/FouGU9k16B/vqIU

The fingerprint matches `ssh-keygen -lf id_ed25519.pub`, so you can confirm the key registered in a CI provider without a terminal.

Audit a legacy RSA key

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC… rsa@host
→ 2048 bits · warn: 3072 bits or Ed25519 recommended

The modulus bit length is read from the wire-format mpint, not guessed from the base64 length; keys below 2048 bits are flagged as weak.

Decode authorized_keys options

restrict,command="/usr/bin/git-shell -c, --user=deploy",no-pty ssh-ed25519 AAAA… deploy@ci
→ options: restrict · command · no-pty

Quote-aware parsing keeps commas inside command values intact. A toggle emits the normalized line with or without options.

Convert an RFC4716 block

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "deploy@ci"
AAAAC3NzaC1lZDI1NTE5AAAAI…
---- END SSH2 PUBLIC KEY ----
→ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI… deploy@ci

Headers and line breaks are folded into the authorized_keys form with the comment unquoted.

Examples

Verify an Ed25519 deploy key

Input
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZelCmxQhwx54vm3wJXXFaSoJRKzg6l8tlesPWV19ht deploy@ci
Output
256 bits · SHA256:ia2yGMNcQtvSfO6sRavTDism6FC/FouGU9k16B/vqIU · MD5 ac:46:…:57 · comment deploy@ci

Both fingerprints match `ssh-keygen -lf` on the same public key, so the registered key is confirmed without shell access.

Restricted authorized_keys entry

Input
restrict,command="/usr/bin/git-shell -c, --user=deploy",no-pty ssh-ed25519 AAAA… deploy@ci
Output
options: restrict · command (/usr/bin/git-shell -c, --user=deploy) · no-pty; normalized line drops options by default

The comma inside the quoted command does not split the option, and toggling Keep options restores the restrictions verbatim.

Legacy RSA audit

Input
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ… rsa@host (1024-bit fixture)
Output
1024 bits · strength weak · 'regenerate with at least 3072 bits'

The modulus mpint is measured on its magnitude, so a leading sign zero cannot inflate the reported size.

About this tool

SSH Public Key Inspector reads a public key you already have and shows what is inside it: the algorithm and bit length decoded from the RFC 4251 wire blob, the comment field, any leading authorized_keys options, and the exact fingerprints printed by ssh-keygen -lf. SHA-256, MD5, SHA-1 and SHA-512 are computed over the raw blob bytes in your browser tab — the key is never uploaded or stored.

Paste an OpenSSH one-liner, an RFC4716 (SSH2) block, a known_hosts line or a bare base64 blob. Quote-aware parsing finds the key type even when a command option contains spaces and commas, and the normalized output gives you a single clean authorized_keys line with or without the original options.

Strength notes turn the raw numbers into a decision: RSA under 2048 bits is flagged weak, 2048 bits is a warning to move toward 3072 bits or Ed25519, DSA is deprecated, and Ed25519 is the modern default. Two-key comparison reports matching fingerprints plus field-level type, size and comment differences, which is the fastest way to verify a CI deploy key without a terminal.

What this tool does not do

  • Public keys only: private-key PEM blocks are rejected and never parsed.
  • OpenSSH certificates are identified and their serial and key ID are decoded, but certificate validation (principals, validity, critical options) is out of scope.
  • FIDO2/sk-* keys are decoded at a basic level; attestation data is not verified.
  • Only the first key line is inspected when several authorized_keys entries are pasted together.
  • Unknown key types are shown with raw length-prefixed fields and no bit length or strength verdict.
  • SHA digests require WebCrypto, so the tool must run in a secure context (HTTPS or localhost).

How to use this tool

  1. Paste a public key

    Paste an authorized_keys line, an RFC4716 block, a known_hosts entry or a bare base64 blob. Decoding starts as soon as you paste.

  2. Read the decoded fields

    Check the key type, bit length, comment and strength chip. Open the wire-format field list or the 128-byte hex dump when debugging a rejected key.

  3. Compare fingerprints

    Copy the SHA-256 or MD5 value and compare it with ssh-keygen -lf output, your git provider, or a second pasted key in Compare mode.

  4. Copy a clean line

    Use the normalized authorized_keys line; toggle Keep options if the restrictions must travel with the key.

Use cases

Audit authorized_keys

Scan team keys for DSA, tiny RSA moduli or surprising comments before approving a server change.

Verify CI deploy keys

Compare the fingerprint shown in a CI console with the key in your repository settings.

Debug rejected keys

Decode the wire fields and byte offsets when a pasted key is truncated, mismatched or in the wrong format.

Convert SSH2 exports

Turn an RFC4716 public-key block from a Windows or legacy tool into a one-line authorized_keys entry.

Accepted key inputs and fingerprint variants

Input / outputMeaning
ssh-ed25519 AAAA… user@hostStandard OpenSSH authorized_keys line: type, base64 wire blob and an optional trailing comment.
ssh-rsa / ssh-dss / ecdsa-sha2-nistp256|384|521Other OpenSSH algorithms; size is read from the RSA/DSA mpint or the ECDSA curve.
restrict,command="…",no-pty ssh-ed25519 …Comma-separated options before the type; commas and spaces inside quoted values stay intact.
@cert-authority host ssh-ed25519 …known_hosts marker and host pattern are stripped before the key is inspected.
---- BEGIN SSH2 PUBLIC KEY ----RFC4716 block: headers and continuation lines are parsed, base64 lines rejoined and the comment unquoted.
SHA256:… / aa:bb:… / SHA1:… / SHA512:…Fingerprint strings use ssh-keygen's prefixes and encodings: unpadded base64 for SHA variants, colon-separated hex for MD5.

Private-key PEM headers are rejected outright; only public material is parsed, even locally.

Common mistakes

Mistake:Pasting a private key into an online decoder.

Fix:This tool rejects private PEM headers; generate the public half locally with `ssh-keygen -y` instead.

Mistake:Comparing a comment or base64 prefix instead of a fingerprint.

Fix:Compare the full SHA-256 string — comments are free text and base64 prefixes are shared by every key of a type.

Mistake:Assuming more base64 characters always mean a bigger RSA key.

Fix:Read the reported modulus bit length; exponent and encoding overhead distort raw blob size.

Mistake:Losing restrictions when copying a normalized line.

Fix:Enable Keep options if the entry needs command, from or no-pty restrictions.

Mistake:Pasting several authorized_keys lines at once.

Fix:Only the first key is inspected; paste keys one at a time for a per-key verdict.

Frequently asked questions

How do I get an SSH key's fingerprint?

Run `ssh-keygen -lf ~/.ssh/id_ed25519.pub` locally, or paste the public key here. The inspector hashes the exact wire-format blob and prints SHA256:… (unpadded base64) plus the MD5 colon-hex value equivalent to `ssh-keygen -lf -E md5`. SHA-1 and SHA-512 variants are shown too, for consoles that use them.

What key size should RSA be today?

Prefer Ed25519, which has a fixed 256-bit key. If you need RSA, use at least 3072 bits; 2048 bits still works but is marked as a warning here, and anything below 2048 bits is flagged weak. DSA is deprecated and should not be added anywhere.

What is the comment field for?

It is a free-text label after the base64 blob, usually the user and host that generated the key. SSH does not verify it, so it is useful for auditing but never proof of identity. A key without one is shown as (none); Unicode comments are preserved in the normalized line.

What do options like restrict mean?

Options precede the key type in authorized_keys. `restrict` disables all forwarding and PTY allocation by default, `command="…"` runs only that command, `from="…"` limits source addresses, and `no-pty` or `no-port-forwarding` remove specific capabilities. The inspector lists each option, flags unrecognized ones, and can keep or drop them in the normalized line.

Can I inspect a private key here?

No. Private-key PEM headers are rejected outright: this tool parses public material only, and even local processing of a private key is not worth the risk. To get the matching public key, run `ssh-keygen -y -f your_private_key` on your own machine and paste the result.

What formats can I paste?

An OpenSSH authorized_keys one-liner, an RFC4716 (SSH2) BEGIN/END block, a known_hosts line (the host pattern and markers are stripped), or a bare base64 wire blob. Multi-line files are accepted, but only the first key is inspected and a counter tells you how many lines were found.

References & standards