SSH Key Generator
Generate an SSH keypair on this device and copy the exact two artifacts SSH consumes: the authorized_keys line and the openssh-key-v1 file.
SSH private keys are generated and downloaded UNENCRYPTED (openssh-key-v1, cipher none); protect them with ssh-keygen -p -a 24 -f <file> locally. Passphrase encryption in-browser requires bcrypt_pbkdf, which WebCrypto lacks.
Jump to outputPublic key — authorized_keys line
One line, never wrapped. Append it to ~/.ssh/authorized_keys on the server, or save it as the .pub file.
No key generated yet.
Private key — openssh-key-v1 file
Save this as the key file itself, with no extension, and make it readable only by you (chmod 600).
No key generated yet.
That command prompts for the passphrase; it is never typed on the command line.
Press ? for shortcuts · Nothing here is stored: no key, no comment, no option. Reloading the page loses the key.
This keypair is minted on your device by Web Crypto. No request leaves this page — not the key, not the comment.
Do it offline:$ ssh-keygen -t ed25519 -C "you@example.com" -f id_ed25519
How to use it
- Pick a type. Ed25519 is preselected, and is what ssh-keygen has produced by default since OpenSSH 9.5; ECDSA offers nistp256, nistp384 and nistp521; ssh-rsa is for a server that accepts nothing else.
- For ssh-rsa, pick 2048, 3072 or 4096 bits — the whole set here. On the other types that row stays put and greys out: the curve fixes the size.
- Type a comment — usually an address or a machine name. It is the trailing label on the public line, it accepts spaces, and it stops at 256 characters; leaving it empty is valid too.
- Press Generate, or ⌘/Ctrl + Enter. Every type is built in a worker so the form never freezes; a run longer than a moment paints a progress bar and a millisecond count.
- Copy the public line into the server's ~/.ssh/authorized_keys, and save the private file as ~/.ssh/id_ed25519 (or id_ecdsa, or id_rsa) with permissions 600 — the mode ssh insists on.
Choose Ed25519, an ECDSA curve or an RSA size, add the comment you want on the end of the line, and press Generate. Your browser's Web Crypto mints the pair; this page writes the one-line authorized_keys entry, the openssh-key-v1 private file and the SHA-256 fingerprint that ssh-keygen -l would print for the same key. The private half is hidden until you reveal it, and it is stored nowhere.
Examples
Ed25519, comment spike@catw2 — both artifactsssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHaPaRiORLRYcIdzBMxIjuMwC5O0wXPmEeydSTd1qvSf spike@catw2
256 SHA256:/8ir61Y5VMl/LXId1Gga5lqje4tziRYpkcyEjh+4ukg spike@catw2 (ED25519)
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACB2j2kYjkS0WHCHcwTMSI7jMAuTtMFz5hHsnUk3dar0nwAAAJBsKkFwbCpB
cAAAAAtzc2gtZWQyNTUxOQAAACB2j2kYjkS0WHCHcwTMSI7jMAuTtMFz5hHsnUk3dar0nw
AAAEBiluNdkOzlpac0ZLMKcF2jjCIl7Bim0oPWrBuhpTSff3aPaRiORLRYcIdzBMxIjuMw
C5O0wXPmEeydSTd1qvSfAAAAC3NwaWtlQGNhdHcyAQI=
-----END OPENSSH PRIVATE KEY-----
One line for the server, one file for you, one fingerprint to read them back. The armor wraps at 70 columns, not the 64 a PEM uses, and the private section ends in the 1,2 padding that rounds it up to a multiple of 8. This throwaway key was generated for these docs alone.
ECDSA nistp256, comment spike@catw2 — public line and fingerprintecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLoQw9Ew4ttkgdrbGeveul2Xnnf/1EMpD9tUoMtpJzH6CCT4tpawSFRkz1e6HtBgm4UaVYb5UnM7QjCbXxayEHw= spike@catw2
256 SHA256:WpYh5nqdmsbFYh86lkBFcflsPlCrybR1GigEvmEowA4 spike@catw2 (ECDSA)The curve name appears twice on purpose: once in the key type at the front of the line and once inside the blob, where RFC 5656 §3.1 requires it. The 65 bytes after it are the uncompressed point, 0x04 then X then Y.
Edge case — Ed25519 with the comment left emptyssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPxLBRQVocXe7+OoACef0eHK22xVGOPZUypC8yezg5q0
256 SHA256:8rneEb/tM3zDm4yi0YQEkitIh6+SxmBIuUIni8WT1Z4 no comment (ED25519)A key without a comment is valid, so the tool notes it rather than refusing: the line ends after the base64, with no trailing space. Reading it back, ssh-keygen -l prints no comment in that column.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
The private file is written unencrypted
SSH private keys are generated and downloaded UNENCRYPTED (openssh-key-v1, cipher none); protect them with ssh-keygen -p -a 24 -f <file> locally. Passphrase encryption in-browser requires bcrypt_pbkdf, which WebCrypto lacks. That command prompts for the new passphrase interactively and answers "Your identification has been saved with the new passphrase."
ssh-rsa names the key, not the signature
The blob for an RSA key is labelled ssh-rsa even on a current OpenSSH, which signs with rsa-sha2-256 or rsa-sha2-512 and negotiates that separately. The label does not mean SHA-1.
The fingerprint is taken over the public blob
SHA-256 runs over the decoded base64 of the public line, never over the private file, and the digest follows SHA256: in standard base64 with the padding removed. That is the string ssh-keygen -l shows.
One press, one unrelated key
There is no seed field and no history: generating again replaces what is on screen with unrelated material. A shared link carries the type, the size and the comment, never a byte of the key.
What this page will not do
It cannot read a key you already have, so there is no paste box, no known_hosts or authorized_keys parsing and no PuTTY .ppk export. Certificates and signing requests are not built here, and the PKCS#8 and SubjectPublicKeyInfo PEM pair is what the RSA key generator page hands over.
Common errors
The comment holds a control character (U+000A) at character 7. An SSH public key is one line, so a newline or tab would split it in two. Remove that character and generate again.- Pasting a line break or a tab into the comment box. The refusal points at that character's position, and nothing is generated.
The comment is 300 characters, over the 256-character limit. The comment is the trailing label on the key line, not part of the key. Shorten it to 256 characters or fewer.- The comment is capped rather than quietly cut, so what you copy is what you typed. Nothing else here has a length limit, because nothing is pasted in.
"ssh-dss" is not a key type this tool can build. The supported types are ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-rsa, and ssh-rsa accepts 2048, 3072, 4096 bits. Pick one of those and generate again.- The form offers only these five names and the link reader refuses the rest, so this is the generator's own last check. OpenSSH itself dropped ssh-dss in version 10.
Key generation needs the Web Crypto API, and this page cannot reach it. Browsers expose crypto.subtle only in a secure context (HTTPS, or localhost). Reload this page over HTTPS and try again.- Web Crypto is withheld on plain http away from localhost, so there is no generator to call and the form says so.
This browser cannot generate Ed25519 keys: its Web Crypto build does not implement them. Ed25519 needs Chrome/Edge 137+, Firefox 130+, Safari 17+. Update this browser, or pick ECDSA or RSA here instead.- Ed25519 reached Web Crypto later than the other families. Below that floor the option is disabled with this reason shown, never dropped from the list without explanation.
The browser did not produce a ssh-rsa keypair. The key generator reported the reason below. Try again, or pick a different key type.- Whatever the browser refused with is printed underneath, word for word, because it names the family and size this layer cannot see.
FAQ
Which type should I pick?
Ed25519, unless the other end refuses it: shortest line, fastest to generate, and the default ssh-keygen picks. Choose an ECDSA curve when a policy names one, and ssh-rsa 3072 or 4096 only for a server that takes nothing else.
Can I put a passphrase on the key here?
No — the file this page writes has cipher none, so anyone who opens it holds the key. Add one on your own machine right after saving, with ssh-keygen -p -a 24 -f id_ed25519, which rewrites the same file encrypted.
Does any of this key material leave my device?
No. Web Crypto creates the pair in this tab, the artifacts are built in a worker beside it, downloads come from a local blob, and nothing reaches storage or a URL. The test suite fails if a request call turns up in the engine, the island or the worker.
Keyboard shortcuts
- ⌘/Ctrl + Enter
- Generate a key with the current options
- ⌘/Ctrl + Shift + C
- Copy the selected output pane
- ? or ⌘/Ctrl + /
- Show the keyboard shortcut help