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.
- Pick a key size — 2048-bit or 4096-bit RSA.
- Enter a comment to label the key, such as your email or user@host.
- Click Generate SSH Key Pair and wait a moment.
- Copy the OpenSSH public key into the server's authorized_keys file.
- 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
Frequently Asked Questions
Why use SSH Key Generator?
- Creates a complete RSA key pair in seconds with no software to install
- Public key is pre-formatted in OpenSSH style, ready for authorized_keys
- Choose 2048-bit for speed or 4096-bit for extra strength
- Runs locally with the Web Crypto API, so the private key never leaves your browser
Common use cases
- Set up passwordless SSH login to a remote Linux server
- Add a deploy key to GitHub, GitLab, or Bitbucket
- Authenticate to a cloud VM or VPS without a password
- Provision keys for a new developer joining a project
- Learn how SSH public-key authentication works hands-on
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
Passphrase Generator
Generate memorable, strong passphrases from random words with custom length, separators and capitalization. Crypto-random and private — nothing leaves your browser.
Phone Number Parser
Parse, validate, and format any phone number online. Get E.164, international, and national formats plus the country and line type. Free, runs in your browser.
RSA Key Generator
Generate an RSA public/private key pair in PEM format (2048 or 4096-bit) using the Web Crypto API. Free, private, in-browser.
UUID Generator
Generate random UUID v4, timestamp-based UUID v1, and ULID identifiers. Bulk-generate up to 100 at once and copy them instantly — free and private.
Token & API Key Generator
Generate secure API keys, tokens, and random strings online. Cryptographically random with customizable length and character sets.
Password Generator
Generate strong, secure, random passwords instantly. Uses the Web Crypto API — nothing is sent to any server, so your passwords stay private.
Explore all Generators.