Skip to content
OddsockLocal
Local
Source text
AlgorithmEd25519
RSA key size3072
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Leave the algorithm on Ed25519 unless you need RSA.
  2. Copy the public line into the Git host or into authorized_keys.
  3. Save the private block as a file the SSH client can read, and do not commit it.
  4. If you need a passphrase on the private key, add it with the SSH tools on your machine.

What is SSH key generator?

Git hosts and SSH servers want a public line they can drop into authorized keys, and a private file in OpenSSH form. This page generates Ed25519, the opening choice, or RSA at 2048, 3072, or 4096, and writes the public key as a single ssh-ed25519 or ssh-rsa line plus a private key block that begins with -----BEGIN OPENSSH PRIVATE KEY-----. Ed25519 public keys start with ssh-ed25519 and are short. That is the one to put on a Git host unless the host has not caught up.

Read more

The private key is not wrapped in a passphrase. ssh will accept it, and so will anyone else who gets the file. Put it in ~/.ssh with permissions the SSH client considers private, and add a passphrase in ssh-keygen on your machine if you want one. This page will not remember the key. Generating a second pair does not revoke the first. Remove the old public line from the host if the first private key might have leaked.

A test public line from a sample run is not yours. Generate a pair on the machine you will use, or generate it here and move the private file once, carefully.

Use cases

  • A new laptop needs an id_ed25519 pair for a Git host.
  • A deploy key is generated for one repository and the public line is pasted into the host.
  • A legacy bastion that only accepts RSA gets a 3072-bit ssh-rsa key.
  • A workshop student sees the difference between the one-line public key and the private block.
  • An old key that was emailed is retired and replaced with a pair generated locally.

An Ed25519 key for a Git host

Algorithm Ed25519.

A public key on one line beginning ssh-ed25519, and a private key block beginning -----BEGIN OPENSSH PRIVATE KEY-----. Paste the public line into the host. Keep the private block off the host.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

On the server or the Git host, as one line. The private key stays on the machine that will connect. Uploading the private key to the host defeats the point.