SSH Key Generator: Ed25519 and RSA Key Pairs

Create an Ed25519, RSA 2048 or RSA 4096 key pair for SSH logins or Git hosting. The public key comes out in the one-line OpenSSH format that goes into authorized_keys.

Recommended - faster, smaller, and considered more secure than RSA.

Runs in your browser: your files and text are not uploaded. Free, no account needed.

Last updated: · Reviewed by the QuickTooly Team

Key types and output formats

  • Ed25519 (default): made with the tweetnacl library, which takes its randomness from crypto.getRandomValues. The private key is saved in the OpenSSH format (-----BEGIN OPENSSH PRIVATE KEY-----), the same format ssh-keygen -t ed25519 writes. The public key starts with ssh-ed25519. Ed25519 keys are short and are supported by OpenSSH 6.5 and later, GitHub, GitLab and most current servers.
  • RSA 2048 and RSA 4096: generated by the browser's Web Crypto API with public exponent 65537, then formatted with the node-forge library. The public key starts with ssh-rsa. The private key is a PKCS#1 PEM file (-----BEGIN RSA PRIVATE KEY-----), which OpenSSH also reads. A 4096-bit key takes longer to generate than a 2048-bit one. Choose RSA only when a system does not accept Ed25519.

The optional comment, often user@hostname, is added to the end of the public key and, for Ed25519, stored inside the private key. It is a label only and has no effect on security.

The private key has no passphrase

The tool cannot encrypt the private key, so anyone who gets a copy of the file can use it. Add a passphrase right after you save it:

ssh-keygen -p -f ~/.ssh/id_ed25519

For a key you will use on a real server, generating it on that machine with ssh-keygen avoids having the private key in a browser or in your Downloads folder at all.

Installing the key pair

  • Save the private key as ~/.ssh/id_ed25519 or ~/.ssh/id_rsa (the download uses these names) and run chmod 600 on it. OpenSSH refuses a private key that other users can read.
  • Add the public key line to ~/.ssh/authorized_keys on the server, or paste it into the SSH keys settings of GitHub or GitLab.
  • Check the fingerprint with ssh-keygen -lf ~/.ssh/id_ed25519.pub and compare it with what the server or Git host shows.

Frequently Asked Questions

What happens if key generation fails?

An error message with the reason appears below the Generate button, and no key is shown. Try again; if it keeps failing, reload the page.

Why does ssh say "UNPROTECTED PRIVATE KEY FILE"?

The private key file can be read by other users on your computer. Run chmod 600 on the file and try again.

Can I convert the RSA private key to the OpenSSH format?

Yes. Adding a passphrase with ssh-keygen -p rewrites the file, and current OpenSSH versions save it in the OpenSSH format.

Related Tools

  • File Hash Calculator - take a SHA-256 of a downloaded key file before you copy it to another machine.
  • Certificate Decoder - for TLS certificates, which use X.509 rather than SSH key formats.
  • Bcrypt Generator - hash a password for a login system instead of using key-based auth.