CodeBrowser

SSH Key Generator

Generate a new SSH key pair in seconds. Choose Ed25519 or RSA, then copy or download your public and private keys in OpenSSH or PuTTY (.ppk) format.

Runs in your browserEd25519 & RSAOpenSSH & PuTTYFree, no sign-up

Key type

Keys are generated in your browser with the Web Crypto API. Nothing is uploaded or stored.

Why CodeBrowser

A safer, simpler way to generate SSH keys

Private by design

Your keys are created by your browser’s Web Crypto API. Nothing is uploaded, logged or stored. Refresh the page and they’re gone.

Ed25519 and RSA

Modern Ed25519 keys by default, plus RSA 4096 and RSA 2048 for older servers, routers and devices.

OpenSSH and PuTTY

Download keys ready for Linux, macOS and Windows OpenSSH, or as a .ppk file for PuTTY, WinSCP and FileZilla.

Command line

How to generate an SSH key with ssh-keygen

Prefer the terminal? ssh-keygen is built into Windows 10 and 11, macOS and Linux. Open a terminal (PowerShell on Windows) and run one of these commands:

Ed25519 (recommended)

ssh-keygen -t ed25519

RSA 4096 (older systems)

ssh-keygen -t rsa -b 4096

ssh-keygen asks where to save the key (press Enter to accept the default, ~/.ssh/id_ed25519) and for an optional passphrase. The -t option sets the key type, -b sets the key size for RSA, and you can add -C "work-laptop" to label the key so you can tell your keys apart. Then save your servers and keys in one place with the SSH Config Generator.

Setup

How to add your SSH key to a server

Save both files

Put them in your .ssh folder: ~/.ssh on macOS and Linux, or C:\Users\YourName\.ssh on Windows.

Protect the private key

On macOS or Linux, make it readable only by you: chmod 600 ~/.ssh/id_ed25519

Copy the public key

Run ssh-copy-id -i ~/.ssh/id_ed25519.pub user@server, or paste the key on its own line in ~/.ssh/authorized_keys on the server.

Connect

Log in with ssh user@server. You won’t be asked for the account password.

GitHub, GitLab and most hosting control panels also have an “SSH keys” page where you can paste your public key directly. New to this? Follow our step-by-step guide on how to SSH into a server.

Key types

What is Ed25519?

Ed25519 is a modern public-key signature algorithm built on the Curve25519 elliptic curve. It’s the default key type in current versions of OpenSSH and the one GitHub recommends.

An Ed25519 key is short (the whole public key fits on one line), quick to generate and verify, and offers security comparable to a 3072-bit RSA key. The private key is saved as id_ed25519 and the public key as id_ed25519.pub, which starts with ssh-ed25519.

Ed25519 vs RSA: which SSH key should you use?

Ed25519RSA 4096
SecurityStrongStrong
Public key lengthAbout 80 charactersAbout 720 characters
SpeedVery fastSlower to generate and sign
CompatibilityOpenSSH 6.5+ (2014) and nearly all modern clientsWorks everywhere, including very old systems

Use Ed25519 unless you need to connect to an older system that doesn’t support it. If you do need RSA, use at least 3072 bits. 4096 is a safe choice.

Using your SSH key with PuTTY

PuTTY and WinSCP use their own .ppk key format. Select PuTTY (.ppk) above and download the file, then in PuTTY go to Connection → SSH → Auth → Credentials and browse to it under “Private key file for authentication.”

The file uses the PPK version 2 format, which works with PuTTY 0.68 and later, WinSCP and FileZilla. Not sure which app to use? Compare the best SSH clients.

Is this SSH key generator safe?

Your keys are generated by your browser’s built-in Web Crypto API. This page doesn’t send them anywhere and nothing is saved.

Still, a private key is only as safe as the device that created it. For keys that protect production servers, running ssh-keygen on your own machine is the gold standard.

FAQ

SSH key questions, answered

Where are SSH keys stored?

By default, in the .ssh folder in your home directory: ~/.ssh/ on macOS and Linux, and C:\Users\YourName\.ssh\ on Windows. The private key is named id_ed25519 (or id_rsa), and the public key has the same name with .pub on the end.

Which key do I share, the public or the private key?

Only the public key: the .pub file, which starts with ssh-ed25519 or ssh-rsa. Your private key never leaves your computer. Anyone who has it can log in as you.

How do I add a passphrase to my SSH key?

Run ssh-keygen -p -f ~/.ssh/id_ed25519 and enter a new passphrase when asked. For a .ppk file, open it in PuTTYgen, type a passphrase in the Key passphrase fields and click Save private key.

Can I convert a key between OpenSSH and PuTTY formats?

Yes. Open the key in PuTTYgen with Load. Use Save private key to create a .ppk file, or Conversions, then Export OpenSSH key, to create an OpenSSH file.

Should I use RSA 2048 or 4096?

A 2048-bit RSA key is still considered secure, but 4096 bits gives you more headroom for the future. If the system you are connecting to supports Ed25519, it is a better choice than either.

Does ssh-keygen work on Windows?

Yes. Windows 10 (version 1809 and later) and Windows 11 include the OpenSSH client, so you can run ssh-keygen in PowerShell or Command Prompt without installing anything.

Ready to create your SSH key?

It takes about two seconds, and your keys never leave your browser.

Generate an SSH key