🔑 Security

SSH Key Generator

Generate RSA (2048/4096-bit) key pairs in your browser using Web Crypto API. Keys are generated client-side and never transmitted.

📖 How to Use
1
Select key type and bit length
2
Click Generate — key pair created via Web Crypto API
3
Copy public key to ~/.ssh/authorized_keys on your server
4
Save private key securely — never share it
⚙️ Key Configuration

Pitfalls That Trip Up Even Experienced Engineers

A Cautionary Tale: The Shared Deploy Key

A mid-size engineering team once generated a single SSH key pair for "deployments" and distributed the private half to every contractor who touched the release pipeline over two years, storing it in a shared password vault entry that nobody thought to rotate. When the contract with one contractor ended, the offboarding checklist covered email, Slack, and VPN access — but nobody remembered that the same key was still sitting in that vault entry, still valid, still listed in the authorized_keys file of a dozen production hosts. Nine months later, a routine access audit turned up SSH logins from an IP range that didn't match any current employee, traced back to the same never-rotated key.

Nothing had actually been exfiltrated, but the incident review concluded that a single long-lived, widely shared key with no expiry and no per-person attribution had turned what should have been a two-minute offboarding step into a months-long blind spot. The fix was mundane but effective: one key per engineer, keys tied to an identity in the access-review system, and a hard rule that any key not rotated within a defined window gets pulled from every host automatically.

Where Browser-Generated Keys Fit Into Your Workflow

Wiring Key Generation Into Automated Pipelines

Production CI/CD systems rarely generate SSH keys through a browser — instead they call ssh-keygen or an equivalent library programmatically as part of pipeline bootstrap, then store the private half as an encrypted secret in the CI platform (GitHub Actions secrets, GitLab CI/CD variables, or a dedicated secrets manager like Vault or AWS Secrets Manager) rather than committing it anywhere. A typical deploy pipeline injects that secret into an ephemeral ssh-agent at job start, uses it to authenticate against the target hosts, and lets the agent's in-memory storage disappear when the job finishes — the key material never touches the runner's disk.

Best practice layers on top of this: scope each CI deploy key to a single repository or a single environment using GitHub's per-repository deploy keys or a forced-command restriction in authorized_keys (command="/opt/deploy.sh" ssh-rsa AAAA...), so a compromised pipeline credential can only run the one action it was issued for. This browser tool is a reasonable stand-in when you need to generate a one-off key by hand to test a pipeline's authentication step locally, but the production path should always generate, store, and rotate keys through infrastructure your CI system controls directly.

Frequently Asked Questions

What key type should I use — RSA 2048 or RSA 4096?

RSA 4096-bit keys provide a higher security margin and are the recommended choice for keys that will protect long-lived access to important infrastructure. The computational cost of RSA 4096 is higher than 2048-bit, but for interactive SSH sessions this difference is imperceptible. RSA 2048-bit is considered secure by current standards and is appropriate for short-lived keys or high-throughput automation where authentication speed matters. Both options are widely supported by all major SSH servers and Git platforms.

Is it safe to generate SSH keys in a browser?

This tool uses the Web Crypto API, a cryptographically secure subsystem built into modern browsers and subject to the same security review as password managers and online banking applications. Key generation happens entirely in your browser process and no data is transmitted over the network. That said, for the highest-security use cases — keys protecting production databases or root access to critical infrastructure — generating keys directly on the target server or a dedicated air-gapped workstation eliminates any concern about the browser environment.

How do I add my public key to a server or GitHub?

To authenticate with a Linux server, copy the public key text and append it to the file ~/.ssh/authorized_keys on the remote host — one key per line. The ~/.ssh directory must have permissions 700 and authorized_keys must have permissions 600, otherwise the SSH daemon will refuse to use it. You can also use ssh-copy-id -i pubkey.pub user@server if you have temporary password access. For GitHub or GitLab, paste the public key into your account settings under "SSH Keys" — the platform uses it to verify your identity during git clone and git push operations.