SSH Key Generator
An Ed25519 or RSA 4096 SSH key pair in OpenSSH format. Generated in your browser, never sent anywhere.
The key pair is generated in your browser; nothing is sent or stored.
The best option: generate the key on your own computer
The safest way, so the private key never passes through anything else, is to generate it with ssh-keygen on the computer you will connect from. The command ships with Windows 10 and 11 (PowerShell), macOS and Linux, and is the same on all three:
ssh-keygen -t ed25519 -C "name@laptop"
It saves the key under C:\Users\<name>\.ssh\ on Windows and ~/.ssh/ on macOS and Linux, and asks for a passphrase, which stops the key from being used even if the file is stolen. The tool on this page is a convenience for when you cannot reach a command line or just need a key pair quickly. Here too the key is generated only in your browser.
Adding the public key to a Linux VDS
Only the public key (.pub) ever goes to the server; the private key stays on your computer. On macOS and Linux one command does it:
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@SERVER_IP
Windows PowerShell has no ssh-copy-id; this does the same:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@SERVER_IP "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
To add it by hand, paste the public key line into ~/.ssh/authorized_keys on the server. The folder must be 700 and the file 600; with looser permissions SSH ignores the key:
mkdir -p ~/.ssh && chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys # paste the public key line
chmod 600 ~/.ssh/authorized_keys
Using a key generated here
Move both downloaded files into your .ssh folder. On macOS and Linux the private key file must be 600, or ssh refuses it with "UNPROTECTED PRIVATE KEY FILE". The downloaded key has no passphrase; the first thing to do is add one on your own computer:
mv ~/Downloads/id_ed25519 ~/Downloads/id_ed25519.pub ~/.ssh/
chmod 600 ~/.ssh/id_ed25519
ssh-keygen -p -f ~/.ssh/id_ed25519 # adds a passphrase
ssh -i ~/.ssh/id_ed25519 root@SERVER_IP
On Windows, put the files in C:\Users\<name>\.ssh\ and add a passphrase in PowerShell with ssh-keygen -p -f $env:USERPROFILE\.ssh\id_ed25519. If ssh reports "Bad permissions", restrict the file to your own user: icacls $env:USERPROFILE\.ssh\id_ed25519 /inheritance:r /grant:r "$($env:USERNAME):F"
Turning off password login
Do not disable password login before testing key login in a new window, and keep your current session open. Once the key works:
# /etc/ssh/sshd_config and /etc/ssh/sshd_config.d/*.conf
PasswordAuthentication no
KbdInteractiveAuthentication no
sudo sshd -t && sudo systemctl reload ssh # AlmaLinux / Rocky: sshd
On Ubuntu, files such as /etc/ssh/sshd_config.d/50-cloud-init.conf can override the main setting, so check them too. If you lock yourself out, log in with your password through the KVM console in the client panel and undo the change; the console works independently of SSH. For the basics see what SSH is and how to connect, and for first steps the Linux VDS getting started guide.
Ed25519 or RSA?
Ed25519 is short, fast and the default in current OpenSSH; its public key fits comfortably on one line. Pick RSA 4096 only for old systems that do not know Ed25519 (OpenSSH before 6.5, some old network devices and panels). Browsers can generate Ed25519 from Chrome and Edge 137, Firefox 129 and Safari 17; on an older browser the tool switches to RSA.
The key pair is generated on your computer with the browser's WebCrypto interface. It is not sent to our server, not stored and never put in the address bar. For a server to use it with, see our Linux VDS plans.
More free tools
FAQ
About SSH Key Generator
No. The key pair is generated in your browser; the page sends no request and the key is not stored. Still, the safest option is generating the key on your own computer with ssh-keygen -t ed25519.
On the server, ~/.ssh must be 700, authorized_keys 600, both owned by the user you log in as. The public key must be a single line, not split while copying. On your computer, ssh -v -i ~/.ssh/id_ed25519 root@IP shows which key is tried; on the server, journalctl -u ssh shows why it was refused.
A private key cannot be recovered and we have no copy. Generate a new pair, log in through the KVM console in your panel or with a password, add the new public key to authorized_keys and delete the old line.