Help

SSH Key Generator: Make an Ed25519 or RSA Key Pair Online

This SSH key generator makes a key pair without a terminal or ssh-keygen. Pick an Algorithm, press Generate Key Pair, download the private key and copy the public key line for GitHub, GitLab or a server. The keys are created in your browser and never leave it, and the page cannot save or upload them.

How to Generate an SSH Key Online

  1. Leave Algorithm on Ed25519 (recommended), or choose RSA 4096-bit or RSA 2048-bit for an older server.
  2. Optionally type a label in Comment (optional), such as you@example.com. It can be up to 100 characters.
  3. Press Generate Key Pair. Ed25519 is instant; RSA 4096-bit can take a few seconds.
  4. In the red Private key card, press Download Private Key. The file is named id_ed25519 for Ed25519 or id_rsa for either RSA size.
  5. In the Public key card, press Copy to Clipboard. The button reads Copied for a moment.
  6. Press Start over to return to the first screen. The key pair is not kept, so download first.

Private Key and Public Key: What Each One Is For

KeyWhat it looks likeWhere it goes
Private key (download)An unencrypted OpenSSH file starting -----BEGIN OPENSSH PRIVATE KEY-----Your ~/.ssh folder, and nowhere else. Never share it
Public key (copy)One line: ssh-ed25519 AAAA... you@example.com, or ssh-rsa AAAA... for RSAGitHub or GitLab SSH key settings, or a server's authorized_keys file

Whoever holds the private key can sign in as you, so the page marks it in red and the public key as safe to share. With an empty comment the public key line ends after the key, with no trailing space.

Ed25519 or RSA: Which Algorithm to Choose

AlgorithmPrivate key filePublic key starts withChoose it when
Ed25519 (recommended)id_ed25519ssh-ed25519Almost always: short, fast, accepted by current GitHub, GitLab and OpenSSH
RSA 4096-bitid_rsassh-rsaAn older server refuses Ed25519 and you want the larger RSA size
RSA 2048-bitid_rsassh-rsaAn older server refuses Ed25519 and a quicker generation matters more

Both RSA sizes download as id_rsa. If you already have a key with that name, rename the new file before you move it into place.

After Downloading: Set the Permissions

A downloaded file arrives with normal permissions, and ssh refuses a private key that other users can read, with a message such as UNPROTECTED PRIVATE KEY FILE or permissions are too open. On macOS and Linux, put the file in your .ssh folder and make it readable only by you:

mkdir -p ~/.ssh mv ~/Downloads/id_ed25519 ~/.ssh/ chmod 600 ~/.ssh/id_ed25519

Use id_rsa in place of id_ed25519 for an RSA key. The page repeats the chmod command in its After downloading note. On Windows the file has to be readable only by your own account for the same reason.

Add the Public Key to GitHub, GitLab or a Server

For GitHub or GitLab, paste the copied line into the new SSH key box in your account settings. For a server, append the line to ~/.ssh/authorized_keys on that server, then connect with the key:

echo "ssh-ed25519 AAAA... you@example.com" >> ~/.ssh/authorized_keys ssh -i ~/.ssh/id_ed25519 user@host

The page has no button to download the public key. To keep a .pub file next to the private key, paste the copied line into a new text file named id_ed25519.pub.

The Key Has No Passphrase: Add One Afterwards

The generated private key is not encrypted, and the page has no passphrase field. If the file is lost or copied, the key works for whoever has it. To protect it, add a passphrase on the machine where the file now lives:

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

The public key does not change when you add a passphrase, so nothing already uploaded to GitHub or a server needs replacing.

What the Comment Field Does

Comment (optional) is a label added to the end of the public key. It helps you tell keys apart in a list, for example by writing your email address or the name of the laptop. It does not affect how the key works, and you can leave it empty.

The key pair is not stored anywhere and is gone when you leave the page, so download the private key before you press Start over or close the tab. Never paste the private key into a chat, a ticket or a website. For a password rather than a key, there is the Password Generator.


Frequently asked questions

How do I generate an SSH key online?

Leave Algorithm on Ed25519 (recommended), add an optional Comment such as your email address, and press Generate Key Pair. Press Download Private Key to save the file, then use Copy to Clipboard to copy the public key line. Ed25519 appears instantly; RSA 4096-bit can take a few seconds.

Is it safe to generate an SSH key online?

Here the key pair is created in your browser from the browser's secure random numbers, and it exists only in the page's memory until you download it. The page has no way to save or upload your keys, and the private key is gone when you leave. If a key will guard a production server, generate it on a machine you trust, and give any key a passphrase afterwards.

Should I choose Ed25519 or RSA?

Choose Ed25519 unless a server refuses it. Ed25519 keys are short, quick to create and accepted by current GitHub, GitLab and OpenSSH. RSA is for older servers that do not accept Ed25519.

RSA 4096-bit or RSA 2048-bit?

RSA 4096-bit has the larger margin and takes a few seconds to create. RSA 2048-bit is quicker and still widely accepted. Both download as a file named id_rsa and give a public key that starts with ssh-rsa.

Why does ssh say the private key file is unprotected or its permissions are too open?

A downloaded file gets normal permissions that other users on the machine can read, and ssh refuses a private key in that state. On macOS and Linux, move the file into your ~/.ssh folder and run chmod 600 ~/.ssh/id_ed25519 (id_rsa for an RSA key). On Windows the file likewise has to be readable only by your own account.

Where do I save the downloaded private key?

In the .ssh folder of your home directory, which is ~/.ssh on macOS and Linux and C:\Users\<you>\.ssh on Windows. Keep the name the page gave it, id_ed25519 or id_rsa, so ssh finds it without extra options. Both RSA sizes download as id_rsa, so rename the file if you already have a key with that name.

How do I add the public key to GitHub or GitLab?

Press Copy to Clipboard, open the SSH keys page in your account settings, choose to add a new key and paste the whole line into the key box. Paste the public key only, the line that starts with ssh-ed25519 or ssh-rsa, and never the private key file.

How do I add the public key to authorized_keys on a server?

Append the copied line to ~/.ssh/authorized_keys on the server, as one line, for example with echo "ssh-ed25519 AAAA... you@example.com" >> ~/.ssh/authorized_keys. Then connect with ssh -i ~/.ssh/id_ed25519 user@host.

Does the key have a passphrase, and can I add one afterwards?

The key has no passphrase, and the page has no passphrase field. To add one later, run ssh-keygen -p -f ~/.ssh/id_ed25519 on the downloaded file and enter a new passphrase when asked. Until you do, anyone who gets the file can use the key.

What does the comment do?

The comment is only a label added to the end of the public key, usually an email address or a machine name, so you can tell keys apart in a list. It does not change the key itself. It can be up to 100 characters, line breaks are removed, and leaving it empty gives a public key with no trailing label.

Can I get the same key again after I close the page?

No. The key pair is not stored anywhere, so if you leave the page or press Start over without downloading the private key, it is lost and you generate a new pair. Download the private key before you leave.

What format is the private key, and does it work with PuTTY?

The private key is an unencrypted OpenSSH-format file that begins with -----BEGIN OPENSSH PRIVATE KEY-----, the format ssh-keygen has written by default since OpenSSH 7.8. PuTTY uses its own .ppk format, so open the file in a recent PuTTYgen with Conversions, Import key, then save it as a .ppk.

Recommended

Helps keep the tools free. ✨

Images are for illustration only. As an Amazon Associate I earn from qualifying purchases.