File & privacy

SSH Key Generator

SSH Key Generator

Ed25519, ECDSA or RSA SSH keys with an authorized_keys line and an id_* private key file.

About this tool

About SSH Key Generator

Need an SSH key on a machine where you can't run ssh-keygen, or want to see exactly what it produces? This generator creates an Ed25519 key by default, the type GitHub and current OpenSSH recommend, and can switch to ECDSA P-256, P-384 or RSA 2048 to 4096 for older servers. You get two files in OpenSSH's own format: the public key as a single authorized_keys line with your comment, and the private key as an id_ed25519, id_ecdsa or id_rsa file that begins with BEGIN OPENSSH PRIVATE KEY. The encoder is tested against ssh-keygen: for a known key, ssh-keygen reads the private key file and prints the same public key and fingerprint. The SHA-256 fingerprint matches what ssh-keygen -lf and GitHub display. Keys come from your browser's Web Crypto and never leave the tab. The private key has no passphrase, so add one with ssh-keygen -p after saving it, and keep it out of chats, email and repositories.

Built and maintained by Abhi JainUpdated

How to Generate an SSH Key

  1. 1

    Pick the algorithm

    Ed25519 is selected. Choose RSA 3072 or 4096 only if the server is too old for Ed25519.

  2. 2

    Add a comment

    Type a Comment such as you@laptop so you can recognise the key later.

  3. 3

    Save the files

    Download the private key and public key into ~/.ssh/ and run chmod 600 on the private key.

  4. 4

    Install the public key

    Paste the public key into GitHub or GitLab settings, or append it to ~/.ssh/authorized_keys on the server.

SSH Key Generator: questions and answers

Ed25519 or RSA for SSH?

Ed25519. It is faster, the keys are short, and it has been supported since OpenSSH 6.5 (2014). Use RSA of at least 3072 bits only for very old servers or devices that don't accept Ed25519.

Where do I put the SSH key files?

On Linux and macOS, in ~/.ssh/ as id_ed25519 (private) and id_ed25519.pub (public), with chmod 600 on the private file. On Windows, in C:\Users\you\.ssh\. ssh picks up these names automatically.

How do I add a passphrase to the key?

Run ssh-keygen -p -f ~/.ssh/id_ed25519 and enter a passphrase. The file is re-encrypted in place; the public key and fingerprint stay the same.

Is it safe to generate an SSH key online?

Here the key is created by your own browser with Web Crypto and nothing is uploaded, so no server ever sees it. Still, generate keys on a device you trust, and use ssh-keygen when it's available.

How do I check which key a server or GitHub has?

Compare fingerprints. The SHA256: value shown here is the same one ssh-keygen -lf prints and GitHub lists under SSH keys.

More Key Pair Generator presets