🔑 SSH Key Generator – Secure Key Pairs in Your Browser
SSH (Secure Shell) keys are cryptographic credentials used to authenticate with remote servers, code repositories, cloud providers, and CI/CD pipelines — without passwords. This tool generates SSH key pairs entirely in your browser using the Web Cryptography API, so your keys never leave your device.
Why Use SSH Keys Instead of Passwords?
SSH keys offer significantly stronger security than passwords. A typical SSH key pair involves a public key (shared with servers) and a private key (kept secret on your machine). Authentication works by proving possession of the private key through a cryptographic challenge — no password is transmitted over the network.
SSH keys eliminate risks like brute-force attacks, credential stuffing, and phishing for server access. They are required for passwordless login, Git operations via SSH, automated deployments, and API access to cloud services.
Choosing the Right Algorithm
| Algorithm | Key Size | Speed | Compatibility | Recommendation |
|---|---|---|---|---|
| Ed25519 | 256-bit fixed | Very fast | OpenSSH 6.5+, GitHub, GitLab, AWS | ✅ Best choice for new keys |
| RSA 4096 | 4096-bit | Slower | Universal (all systems) | ✅ Best for legacy compatibility |
| ECDSA P-384 | 384-bit | Fast | OpenSSH 5.7+, most modern servers | ✅ Good NIST-curve option |
| RSA 2048 | 2048-bit | Moderate | Universal | ⚠️ Minimum acceptable, prefer 4096 |
Understanding the Output
Public Key — output in OpenSSH authorized_keys format (e.g., ssh-ed25519 AAAA... user@host). Copy this to the server's ~/.ssh/authorized_keys file, or paste it into GitHub/GitLab SSH key settings. It is safe to share publicly.
Private Key — output in PEM/PKCS#8 format. Save this as ~/.ssh/id_ed25519 (or id_rsa, etc.) with permissions chmod 600. Never share this key with anyone.
Fingerprint — a SHA-256 hash of the public key in Base64 format, prefixed with SHA256:. Use it to verify you are connecting to the correct server, or to compare keys across systems.
Using a Passphrase
Adding a passphrase encrypts your private key file using PBKDF2 + AES-256-GCM. Even if your key file is stolen, an attacker cannot use it without knowing the passphrase. Use ssh-agent to cache the decrypted key in memory so you only need to enter the passphrase once per session.
Your private key must remain secret. Never commit it to version control, share it over chat, or store it in an unencrypted cloud drive. If a private key is compromised, revoke it immediately by removing the corresponding public key from all authorized_keys files.
Deploying Your SSH Key
After generating a key pair, add the public key to your target:
- Linux/macOS server: append to
~/.ssh/authorized_keyson the server - GitHub / GitLab / Bitbucket: paste in Settings → SSH Keys
- AWS EC2: add to key pairs or user data during instance creation
- Kubernetes / CI/CD: store as a secret and reference in pipelines
Client-Side Security Model
This tool runs all cryptographic operations using the browser's native SubtleCrypto API (window.crypto.subtle). No keys, passphrases, or any other data are sent to any server. The tool works entirely offline once loaded. You can verify this by opening your browser's network inspector — you will see zero outbound requests during key generation.
The equivalent terminal command is also displayed so you can reproduce the same key type using ssh-keygen for verification or automation purposes.