Create a new SSH key pair right in your browser, the same kind ssh-keygen makes. Pick Ed25519 or RSA, add a comment, and download the OpenSSH private key and the public key line to paste into GitHub, GitLab or a server's authorized_keys. Keys come from your device's secure random generator and never leave the page.
Last updated:
Key type
Public key
share this
Private key
keep secret
Randomart of the SHA256 fingerprint, as printed by ssh-keygen.
Next steps
Advertisement
Advertisement
How to use the SSH Key Generator
Choose the key type. Ed25519 is short, fast and recommended; pick RSA 4096 for older systems that do not support Ed25519.
Enter a comment such as your email or user@host so you can recognise the key later.
Press Generate key pair. The key is created instantly in your browser.
Download the private key and save it as ~/.ssh/id_ed25519 (or id_rsa), then run chmod 600 on it.
Copy the public key and paste it into GitHub/GitLab SSH settings or append it to ~/.ssh/authorized_keys on the server.
Ed25519 vs RSA SSH keys
Ed25519
RSA 3072 / 4096
Public key line length
About 80 characters
About 550 / 730 characters
Security level
About 128-bit
About 128-bit (3072) / higher (4096)
Speed
Very fast signing and verification
Slower, especially signing
Support
OpenSSH 6.5+ (2014), GitHub, GitLab, Bitbucket, modern cloud images
Practically everything, including old servers and network devices
Default file name
~/.ssh/id_ed25519
~/.ssh/id_rsa
RSA keys shorter than 2048 bits are rejected by current OpenSSH releases. Note that the signature algorithm matters too: OpenSSH 8.8 and later disable the old SHA-1 ssh-rsa signatures by default, but RSA keys keep working through the SHA-2 based rsa-sha2-256 and rsa-sha2-512 algorithms, which use the same key files.
What the files contain
The public key line has three parts: the algorithm (ssh-ed25519 or ssh-rsa), the key encoded in base64, and your comment. You can share it freely; one line per key goes into ~/.ssh/authorized_keys on each server you want to log in to.
The private key file starts with -----BEGIN OPENSSH PRIVATE KEY-----. It is the format ssh-keygen has written by default since OpenSSH 7.8 and contains the secret key, a copy of the public key and the comment. Anyone with this file can log in as you, so never paste it into chats, tickets or repositories, and protect it with a passphrase.
Adding the key to GitHub or GitLab
Copy the OpenSSH public key above (it starts with ssh-ed25519 or ssh-rsa).
On GitHub go to Settings → SSH and GPG keys → New SSH key; on GitLab go to Preferences → SSH Keys. Paste the key and save.
Save the private key as ~/.ssh/id_ed25519, run chmod 600 ~/.ssh/id_ed25519, then test with ssh -T [email protected].
Frequently asked questions
Is it safe to generate an SSH key in the browser?
The key pair is created by your browser's WebCrypto API, which uses the operating system's cryptographically secure random number generator, the same source ssh-keygen relies on. Nothing is sent to a server. For keys protecting critical production systems, many teams still prefer running ssh-keygen on the machine that will use the key.
Should I use Ed25519 or RSA?
Use Ed25519 when you can: keys are short, signing is fast, and it is supported by OpenSSH 6.5 and later, GitHub, GitLab and Bitbucket. Choose RSA with at least 3072 or 4096 bits for older servers, network appliances or software that does not accept Ed25519.
Where do I save the private key?
On Linux and macOS save it as ~/.ssh/id_ed25519 (or ~/.ssh/id_rsa) and run chmod 600 on the file, otherwise ssh refuses to use it. On Windows save it in C:\Users\you\.ssh\. Keep the .pub file next to it.
How do I add a passphrase?
The generated private key is unencrypted. Protect it on your computer with ssh-keygen -p -f ~/.ssh/id_ed25519, which asks for a new passphrase and rewrites the file in encrypted form.
Which private key format should I pick?
The OpenSSH format (BEGIN OPENSSH PRIVATE KEY) is what modern ssh-keygen writes and works with OpenSSH, Git and most tools. PEM PKCS#1 (BEGIN RSA PRIVATE KEY) is the legacy RSA format some older tools and libraries require, and PKCS#8 (BEGIN PRIVATE KEY) is the generic format used by OpenSSL and many programming languages.
What is the SHA256 fingerprint?
It is the base64 SHA-256 hash of the public key, the same value ssh-keygen -lf and GitHub display. Compare it to confirm you added the right key. The randomart picture is a visual form of the same fingerprint.
Can I use the key with PuTTY?
PuTTY needs its own .ppk format. Open PuTTYgen, choose Conversions > Import key, load the OpenSSH private key file and save it as a .ppk private key.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.