SSH Key Generator
Keys are generated in your browser. Keep the private key on your device and share only the public key.
Install the key on a Linux server
- Download both files to the same folder on your computer and keep the private key there.
-
Sign in with your existing access to the server account that should use this key. Run these commands on the server.
mkdir -p ~/.ssh chmod 700 ~/.ssh touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keysAppend the complete line from the .pub file to ~/.ssh/authorized_keys on the server. Put it on a new line and keep the existing entries.
-
Back on your computer, open a terminal in the folder containing the downloaded keys. Run chmod on Linux or macOS to restrict access to the private key.
Connect using the private key. Replace [email protected] with your SSH username and server address.
If your SSH client cannot load the .pem private key, generate a pair in OpenSSH format and install the new .pub file.
Generate an SSH key pair in your browser
An SSH key pair lets you authenticate to a server or a Git hosting service. Add the public key to your account or to the server’s authorized_keys file, and keep the matching private key on the device you connect from.
The tool generates both keys using Web Crypto in a secure browser context. Keys and passphrases stay in your browser until you copy or download the result.
Key features
- Four algorithm choices Use Ed25519 for modern SSH clients, ECDSA P-256 for systems that require that curve, or RSA 2048 or 4096 when the service requires RSA.
- Private key formats Export the private key as OpenSSH or PEM (PKCS#8). The public key is always a single OpenSSH line with an optional comment.
- Optional passphrase Provide a passphrase to encrypt the private key with AES-256. Download each key individually or save both in a ZIP file.
- Fingerprint and installation Compare the public key’s SHA-256 fingerprint and use the commands shown with your downloaded filenames to set up SSH access.
How to generate an SSH key pair
Choose an algorithm, set the private key format and download the matching keys.
- Choose an algorithm Select Ed25519, ECDSA P-256, RSA 2048 or RSA 4096 according to the requirements of the system you will connect to.
- Set the private key options Choose OpenSSH or PEM (PKCS#8). Add an optional identifying comment and enter a passphrase if you want to encrypt the private key.
- Generate and save the keys Click Generate SSH key pair. Copy or download the public key for the service, and save the private key in a protected directory.
Usage tips
- Use a comment such as user@laptop to identify the public key when you have several keys. The comment is visible wherever you upload the public key.
- On Linux and macOS, use chmod 600 on a downloaded private key before using it with OpenSSH.
- Use a unique passphrase you can recover. If you lose it, generate a new key pair and replace the old public key on each service.