Create SSH keys in your browser.

SSH Key Generator

Generate an SSH key pair in your browser and download the private and .pub files. No server, plus ssh-keygen commands for every OS.

  • No sign-up
  • Runs in your browser
  • Cryptographic randomness

The private key is generated locally and downloaded unencrypted. Store it in ~/.ssh, run chmod 600 on it, and add a passphrase with ssh-keygen -p. Do not generate production keys on a shared or untrusted device.

Your results

Your results will appear here.

Your inputs and results never leave this device.

Generate an Ed25519, ECDSA, or RSA key pair locally and download both files: the OpenSSH private key and the matching .pub public key. The keys are created with the Web Crypto API inside your browser and are never uploaded, logged, or escrowed.

Use this when you need a key quickly on a machine you trust, want to inspect the OpenSSH formats, or need a throwaway key for a lab. For long-lived production access, ssh-keygen on a trusted workstation with a passphrase remains the safer default.

How to generate an SSH key

  1. 01

    Choose a key type

    Ed25519 is the recommended default. Pick ECDSA or RSA only when a server requires it.

  2. 02

    Add a comment

    An email or host label makes the key easy to identify in authorized_keys.

  3. 03

    Download both files

    Save the private key and the .pub file, then restrict the private key permissions.

Advertisement
Ad placement preview

Popular ways to use SSH keys

Git hosting

Add the public key to GitHub, GitLab, or Bitbucket for passwordless pushes.

Servers and CI

Authorize deploy keys for servers, containers, and build agents.

Learning the format

Inspect the OpenSSH private key, public line, and SHA256 fingerprint side by side.

ssh-keygen commands for each operating system

Every command below creates the key locally. Replace the comment with your own email or host label.

macOS and Linux

ssh-keygen -t ed25519 -C hello@random-generator.dev"
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
ssh-add ~/.ssh/id_ed25519

Copy the public key to the clipboard:

pbcopy < ~/.ssh/id_ed25519.pub                 # macOS
xclip -selection clipboard < ~/.ssh/id_ed25519.pub   # Linux with xclip
wl-copy < ~/.ssh/id_ed25519.pub                # Linux with Wayland

Windows (PowerShell)

ssh-keygen -t ed25519 -C hello@random-generator.dev"
Start-Service ssh-agent
ssh-add $env:USERPROFILE\.ssh\id_ed25519
Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub | Set-Clipboard

Windows (WSL or Git Bash)

ssh-keygen -t ed25519 -C hello@random-generator.dev"
clip.exe < ~/.ssh/id_ed25519.pub

WSL and Git Bash keep their own ~/.ssh directory, separate from the Windows user profile.

Legacy servers without Ed25519

ssh-keygen -t rsa -b 4096 -C hello@random-generator.dev"

Hardware-backed keys (FIDO2 security key)

ssh-keygen -t ed25519-sk -C hello@random-generator.dev"
ssh-keygen -t ecdsa-sk -C hello@random-generator.dev"

Inspect, protect, and test a key

ssh-keygen -lf ~/.ssh/id_ed25519.pub     # show the SHA256 fingerprint
ssh-keygen -y -f ~/.ssh/id_ed25519       # derive the public key again
ssh-keygen -p -f ~/.ssh/id_ed25519       # add or change the passphrase
ssh -T hello@random-generator.dev                    # test a Git hosting connection

How SSH key types differ

  • Ed25519 uses the EdDSA signature scheme on Curve25519. Keys are short, signing is fast, there are no parameter choices to get wrong, and the security level is comparable to RSA 3072. Supported by OpenSSH 6.5 and later, which covers every maintained platform. Choose this by default.
  • Ed25519-SK and ECDSA-SK keep the private key inside a FIDO2 security key and require a physical touch. OpenSSH 8.2 and later. Use these for high-value access when you can carry the token.
  • ECDSA (nistp256, nistp384, nistp521) uses NIST curves. It is broadly supported and compact, but implementations are more sensitive to weak randomness than EdDSA, and some teams avoid the NIST curve parameters on principle. Pick it when a platform or compliance rule asks for it.
  • RSA remains the most universally accepted type. Use at least 3072 bits for new keys; 2048 is the practical minimum and 4096 is a common conservative choice. Modern servers sign with rsa-sha2-256 or rsa-sha2-512 rather than the retired ssh-rsa SHA-1 signature.
  • DSA (ssh-dss) is limited to 1024-bit keys and SHA-1. It is disabled by default and removed from current OpenSSH releases. Do not create new DSA keys.

Key size alone does not make a key better: an Ed25519 key with 68 characters is stronger in practice than an RSA 2048 key, because the algorithms have different security-per-bit.

Passphrases, permissions, and agents

A passphrase encrypts the private key file, so a stolen laptop does not immediately hand over server access. The agent keeps the decrypted key in memory for the session, so you type the passphrase once.

chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
ssh-add --apple-use-keychain ~/.ssh/id_ed25519   # macOS keychain

Add only the contents of the .pub file to a server's authorized_keys or to your Git hosting account. The private key never leaves your machine.

Frequently asked questions

Is the private key sent anywhere?

No. Generation happens in your browser with crypto.subtle, and the files are produced locally through a blob download. There is no server endpoint and no key escrow.

Is a browser-generated key safe to use?

It is only as safe as the device and browser. Malware, hostile extensions, or a shared computer can read page memory and downloads. For production access keys, generate them with ssh-keygen on a trusted machine and protect them with a passphrase.

Can I add a passphrase here?

The downloaded private key is unencrypted, so add one locally with ssh-keygen -p -f ~/.ssh/id_ed25519 right after downloading, or generate the key with ssh-keygen instead.

Which key type should I choose?

Ed25519 for almost everything. ECDSA when a platform requires NIST curves, and RSA 3072 or 4096 for legacy servers that predate Ed25519 support.

Why is Ed25519 unavailable in my browser?

Ed25519 in Web Crypto needs a recent browser version. Update the browser, pick RSA or ECDSA, or run ssh-keygen locally.