SSH key generator

Make an SSH key pair in the same format ssh-keygen writes: a public key line for the server and a private key file for you. The keys are created by your browser's Web Crypto API.

runs in your browser · nothing uploaded

loading tool…

How to use it

  1. Choose Ed25519 (recommended) or RSA, and set a comment such as your email or machine name.
  2. Press "Generate key pair".
  3. Download the private key into ~/.ssh and run chmod 600 on it. Add a passphrase with ssh-keygen -p.
  4. Copy the public key line into the server's ~/.ssh/authorized_keys, or into GitHub under Settings, SSH keys.

Prefer ssh-keygen when you can

The safest private key is one that never exists anywhere but the machine that uses it. If you have a terminal, run ssh-keygen -t ed25519 -C "[email protected]". This page is for when you can't: a locked-down laptop, a quick test server, or learning what the files contain. The key is made in your browser and is not sent anywhere.

Ed25519 or RSA?

Ed25519 keys are short (the public key is 68 characters of Base64), fast and supported by OpenSSH since version 6.5 in 2014, and by GitHub, GitLab and every current server. Use RSA only for old systems that don't support Ed25519, with at least 3072 bits.

What is in the files

The public key line is the key type, the key in Base64, and your comment. The private key file uses OpenSSH's own format, starting with -----BEGIN OPENSSH PRIVATE KEY-----. The fingerprint is the SHA-256 of the public key, in the same form ssh-keygen -l prints, so you can check you added the right key.

Questions

Is my private key sent anywhere?

No. It is generated and formatted in your browser with the Web Crypto API, and leaves the page only when you copy or download it.

Why is there no passphrase option?

Encrypting the key needs OpenSSH's bcrypt-pbkdf scheme. Rather than ship our own version of that, the page tells you the one command that adds a passphrase with ssh-keygen itself.

Does Ed25519 work in every browser?

Current Chrome, Edge, Firefox and Safari support Ed25519 in Web Crypto. If yours does not, the page says so, and RSA still works.