Skip to main content
ToolsHub

SSH Key Generator

Create a 2048 or 4096-bit RSA key pair instantly, with the public key in ready-to-paste OpenSSH format and the private key as PKCS#8 PEM — all generated locally so your private key never leaves your browser.

Updated

Files never leave your browser
Key Size

Your private key never leaves your browser — keys are generated locally with the Web Crypto API.

No key pair yet

Choose a key size and generate an SSH key pair — your private key stays in your browser.

How to use SSH Key Generator

An SSH key pair lets you log in to servers and Git hosts securely without typing a password. This generator creates an RSA key pair entirely in your browser: it hands you the public key in ready-to-paste OpenSSH format and the private key as a PKCS#8 PEM file. Choose 2048-bit for everyday use or 4096-bit for extra margin. Because everything runs locally with the Web Crypto API, your private key is never transmitted, logged, or stored on any server. SSH keys are far stronger than passwords because they rely on a secret that never leaves your machine.

  1. Pick a key size — 2048-bit or 4096-bit RSA.
  2. Enter a comment to label the key, such as your email or user@host.
  3. Click Generate SSH Key Pair and wait a moment.
  4. Copy the OpenSSH public key into the server's authorized_keys file.
  5. Save the private key PEM securely and restrict its file permissions.

Your data never leaves your device — 100% private processing.

How SSH key authentication works

SSH public-key authentication uses a matched pair of keys. The public key can be shared freely and is placed on every server you want to access; the private key is a secret that stays on your machine. When you connect, the server issues a challenge that can only be answered correctly by someone holding the private key, proving your identity without ever sending a password over the network. This is both more convenient and far more secure than passwords: there is nothing to phish, nothing to brute-force remotely, and you can revoke access simply by removing the public key from a server. Protecting the private key — with strict file permissions and ideally a passphrase — is the one responsibility that falls to you.

OpenSSH and PEM formats explained

This tool gives you two pieces in two different encodings. The public key is rendered in the single-line OpenSSH format that begins with "ssh-rsa", which is exactly what servers expect inside an authorized_keys file and what Git hosts ask for when you add a key. The private key is exported as PKCS#8 wrapped in a PEM block, a widely supported standard that OpenSSL and many libraries read directly. Some classic SSH clients prefer the older OpenSSH private-key format; if you hit a compatibility issue, you can import the PEM and re-save it with ssh-keygen, which converts between formats without changing the underlying key.

Worked examples

2048-bit key

Inputs: 2048-bit · me@laptop

Result: ssh-rsa AAAA… me@laptop + PEM private key

4096-bit key

Inputs: 4096-bit · deploy@ci

Result: Stronger key pair for a deploy key

Glossary

Public key
The shareable half of a key pair, installed on servers you log in to.
Private key
The secret half of a key pair that must stay on your machine.
authorized_keys
The server file listing public keys allowed to log in.
PEM
A base64 text format for encoding keys, wrapped in BEGIN/END markers.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Generators

Explore all Generators.