SSH Key Generator
Generate the right ssh-keygen command for your needs. This tool builds commands for you to run in your terminal — no keys are generated in the browser.
Recommended for security
SSH Key Types Compared
| Algorithm | Key Size | Security | Compatibility |
|---|---|---|---|
| ED25519 | 256-bit | Excellent | Modern systems (OpenSSH 6.5+) |
| RSA-4096 | 4096-bit | Very Good | Universal |
| RSA-2048 | 2048-bit | Good (minimum) | Universal |
| ECDSA-384 | 384-bit | Very Good | Most modern systems |
| ECDSA-256 | 256-bit | Good | Most modern systems |
Why ED25519 Is Recommended
ED25519 keys are based on the Edwards-curve Digital Signature Algorithm. They offer several advantages over RSA: faster key generation and authentication, smaller key sizes (256 bits vs 4096 bits for equivalent security), and resistance to certain side-channel attacks. ED25519 is the default choice for GitHub, GitLab, and all modern SSH workflows.
SSH Key Security Best Practices
- Always use a passphrase for interactive keys. This encrypts your private key at rest.
- Set correct file permissions:
chmod 700 ~/.sshandchmod 600 ~/.ssh/id_* - Use separate keys for different services (GitHub, production servers, etc.).
- Rotate keys periodically and remove unused public keys from authorized_keys files.
- Never share your private key. Only the
.pubfile should be distributed.