SSH Key Generator
Generate the perfect ssh-keygen command for creating SSH key pairs. Select your key type (Ed25519 — recommended, RSA, or ECDSA), key size, comment, and passphrase to build a customized command ready to copy and run in your terminal.
What Is ssh-keygen?
ssh-keygen is a command-line tool included with OpenSSH that generates, manages, and converts authentication keys for SSH. It creates a key pair consisting of a private key (which you keep secret) and a public key (which you place on servers you want to access).
Key Types
- Ed25519 (Recommended): Modern elliptic curve algorithm. Fixed 256-bit length. Faster and more secure than RSA. Supported in OpenSSH 6.5+ (2014).
- RSA: Most widely compatible. Supports variable key sizes (2048, 3072, or 4096 bits). Recommended to use at least 3072 bits.
- ECDSA: Elliptic curve Digital Signature Algorithm. Fixed sizes (256, 384, or 521 bits). Good performance but less widely supported than RSA.
Command Options
| Option | Description |
|---|---|
-t | Key type (ed25519, rsa, ecdsa) |
-b | Key size in bits (RSA only) |
-C | Comment (identifies the key) |
-f | Output file (private key location) |
-N | New passphrase (encrypts private key) |
-a | KDF rounds (passphrase protection strength) |
-q | Quiet mode (suppresses output) |
How to Use the Generated Command
- Copy the command from the output box.
- Paste it into your terminal and press Enter.
- Follow the prompts (if any) to complete key generation.
- The private key is saved to the specified file (keep it secret!).
- The public key is saved with a
.pubextension.
Recommended Practices
- Use Ed25519 for new keys — it's the most secure and performant option.
- Add a passphrase to encrypt your private key for an extra layer of security.
- Use a meaningful comment (e.g., your email or hostname) to identify the key.
- Never share your private key — only the public key should be distributed.
Important Disclaimer
This tool generates the ssh-keygen command for your convenience.
The actual SSH key pair is generated when you run the command in your terminal.
Always verify the command before executing it, especially when specifying
output file paths.
❓ SSH Key Generator FAQ
What is the best SSH key type?
Ed25519 is the recommended key type for modern systems. It offers the best security and performance, with a fixed 256-bit key size. Use RSA only if you need compatibility with older systems.
What key size should I use for RSA?
For RSA, 4096 bits is recommended for strong security. 3072 bits is also acceptable. Avoid 2048 bits as it's considered less secure for modern applications.
Do I need a passphrase?
A passphrase adds an extra layer of security by encrypting your private key. If someone gains access to your private key file, they still need the passphrase to use it. It's highly recommended.
What is the output file path?
The default location is ~/.ssh/id_ed25519 (for Ed25519) or ~/.ssh/id_rsa (for RSA). You can change this to any path you prefer.
What is a comment in SSH keys?
The comment is a human-readable label attached to the public key. It helps identify which key is which when you have multiple keys. Common formats are user@hostname or your email address.
What are KDF rounds?
KDF (Key Derivation Function) rounds determine how many iterations are used to derive the encryption key from your passphrase. Higher rounds make brute-force attacks more difficult but increase key generation time.
Is Ed25519 compatible with all SSH servers?
Ed25519 is supported in OpenSSH 6.5+ (released in 2014) and most modern SSH implementations. If you're connecting to very old systems, RSA might be a safer choice.
What is the difference between private and public keys?
The private key stays on your computer and should never be shared. The public key is placed on servers you want to access. They are mathematically linked, but you cannot derive the private key from the public key.
Is this tool free?
Yes, this tool is completely free to use. No registration or personal data storage is required. All calculations are performed in your browser.