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

AlgorithmKey SizeSecurityCompatibility
ED25519256-bitExcellentModern systems (OpenSSH 6.5+)
RSA-40964096-bitVery GoodUniversal
RSA-20482048-bitGood (minimum)Universal
ECDSA-384384-bitVery GoodMost modern systems
ECDSA-256256-bitGoodMost 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

Frequently Asked Questions

Which SSH key type should I use?
ED25519 is recommended for most use cases. It offers the best security-to-performance ratio, produces shorter keys, and is supported by all modern SSH implementations. Use RSA-4096 only if you need compatibility with older systems that don't support ED25519.
Should I set a passphrase on my SSH key?
Yes, always use a passphrase for SSH keys used interactively. A passphrase encrypts your private key on disk, so even if someone steals your key file they cannot use it without the passphrase. For automated systems like CI/CD, passphrase-less keys are sometimes necessary but should be tightly restricted.
How do I add my SSH key to GitHub or GitLab?
Copy the contents of your public key file (ending in .pub) and paste it into your account's SSH key settings. On GitHub, go to Settings > SSH and GPG keys > New SSH key. On GitLab, go to Preferences > SSH Keys. Only ever share your public key, never your private key.
What is the difference between the public and private SSH key?
Your private key stays on your local machine and should never be shared. Your public key (the .pub file) is placed on remote servers or services like GitHub. When you connect, SSH uses a mathematical relationship between the two keys to prove your identity without transmitting the private key.
Embed this tool on your site
<iframe src="https://devtoolbox.dedyn.io/tools/ssh-key-generator" width="100%" height="900" frameborder="0" title="SSH Key Generator"></iframe>
Keyboard Shortcuts
Ctrl+Enter Regenerate
Ctrl+Shift+C Copy command
Ctrl+L Clear fields