b2KIT

SSH Key Pair Generator

Generate SSH key pairs (RSA, Ed25519, ECDSA) with configurable bit length. Download public and private keys.

Tested tool guide Tested browser tools Checked August 16, 2026

What SSH Key Pair Generator does, with a checked example

This tool creates a fresh SSH key pair - RSA, Ed25519 or ECDSA, with bit length where the algorithm allows it - and returns both halves as downloadable files: the private key in OpenSSH format and the one-line public key ready to append to authorized_keys or an account settings page. Everything runs in the browser, so the key material never leaves the machine it was generated on. The surprise for most users: the private key is the whole key. The public key is only derived from it and can be regenerated, while the private key, once lost, is gone forever.

Worked example

A concrete input and expected output from the current implementation.

Input

Algorithm: Ed25519; Comment: [email protected]; no passphrase

Expected output

Public key (one line):
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI<random key material> [email protected]

Private key (file):
-----BEGIN OPENSSH PRIVATE KEY-----
<base64-encoded key material>
-----END OPENSSH PRIVATE KEY-----

The 25-character prefix is not random: it is the base64 encoding of the fixed header that names the algorithm ('ssh-ed25519') and declares the 32-byte key length, so every Ed25519 public key starts with the same AAAAC3NzaC1lZDI1NTE5AAAAI. Everything after that prefix, and all of the private-key body, is freshly generated random material, so no two runs of the tool ever produce the same pair.

How the result is produced

1

Two files, one derivation

The private key downloads as an OpenSSH-format file beginning with the line -----BEGIN OPENSSH PRIVATE KEY-----. The public key is a single line - key type, base64 blob, comment - derived deterministically from the private key: the same private key always produces the same public key, and ssh-keygen -y can re-print it from the private file later.

2

Algorithm and size choices

Ed25519 is fixed at 256 bits; the scheme's security is defined by that size, so no bit-length selector applies to it. ECDSA is available on the NIST curves P-256, P-384 and P-521, which appear in SSH as nistp256, nistp384 and nistp521. RSA is the configurable one: typically 2048, 3072 or 4096 bits, where larger keys mean a stronger security margin but slower generation and slower connection handshakes.

Good uses

  • First-time SSH setup for GitHub, GitLab or similar: generate a pair here, paste the public key into the account's SSH keys settings, and keep the private key file on your machine.
  • Preparing to log into a fresh server: place the public key line into ~/.ssh/authorized_keys on the server so password logins are no longer needed.
  • Replacing a key you suspect leaked or retired, or issuing separate keys per machine or service so a single compromise does not grant access everywhere.

Limits and checks

  • The private key is the only copy that will ever exist. Generation happens locally and nothing is uploaded, so a lost file cannot be recovered by anyone, including this tool. Back it up before putting the public key on a server.
  • A key generated without a passphrase is stored as plaintext on disk. Anyone who copies that file can use it to authenticate as you, so either encrypt it with a passphrase (if the tool offers one) or protect the file with strict filesystem permissions.
  • Ed25519 always yields a 256-bit key; the bit-length selector applies to RSA only. The comment is cosmetic - it labels the key in authorized_keys and in account listings but plays no role in authentication.

Common questions

Can I use the same key pair on several servers?

Yes. The same public key line can be added to authorized_keys on as many servers as you like, and the private key will authenticate to all of them. That convenience is also the exposure: if the private key leaks, everything it unlocks is compromised, which is why some people generate a separate pair per machine.

Where do I put the private key file after downloading it?

Save it under ~/.ssh with a sensible name such as id_ed25519, run chmod 600 on it so only your user account can read it, and connect with ssh -i /path/to/key user@host. The private key is meant for your machine only - never paste it into a form or send it to a server. Only the public key is shared.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools