Preparing your generator page
We are loading content and tools so everything is ready to use.
We are loading content and tools so everything is ready to use.
Build an ssh-keygen command and a short setup script. The form opens on Ed25519, the comment you@example.com, the file id_ed25519, and an empty passphrase, so the command includes -N ''. This page does not create a private key, run the command, or upload a public key. It is not affiliated with OpenSSH or GitHub.
More helpers are in Utility tools.
Last updated: October 8, 2026 · Published: 2026-04-09 · Updated: 2026-10-08
Generated SSH command
ssh-keygen -t ed25519 -C 'you@example.com' -f '~/.ssh/id_ed25519' -N ''
Quick start script
It fills in ssh-keygen -t, and when the type is RSA or ECDSA it adds -b. It always adds -C, -f, and -N. OpenSSH’s manual describes those flags as the key type, the bit length, a comment, the key filename, and the new passphrase.
The passphrase box starts empty. -N '' hands ssh-keygen an empty passphrase, so the program is not left to prompt. OpenSSH says an empty passphrase is allowed, and that a lost passphrase cannot be recovered: you generate a new key and copy the new public key to the machines that should accept it.
The comment and the passphrase have single quotes escaped. The filename is placed inside quotes as typed, after ~/.ssh/. Switching the algorithm does not rename the file already in the box.
Four steps. Run the result in a terminal on the computer that should hold the private key.
Ed25519 has no bit size. RSA opens at 4096. ECDSA opens at 256. The filename stays id_ed25519 until you change it.
An empty box becomes -N ''. Generate writes 20 characters. OpenSSH cannot recover a lost passphrase.
Copy command is the ssh-keygen line. Copy script adds ssh-agent, ssh-add, pbcopy, and a GitHub test.
This page does not run the command. Add the .pub file to the server or account you intend to use.
OpenSSH writes the public key to the same filename with .pub added, and says that file is the one to place in authorized_keys on machines where you log in. The private key file should stay readable only by you. This page does not set those permissions and does not copy the key anywhere.
What the form emits before you change a field.
| Setting | This generator |
|---|---|
| Output | An ssh-keygen command and a script. No private key |
| Default type | Ed25519, with no -b flag |
| Default command | ssh-keygen -t ed25519 -C 'you@example.com' -f '~/.ssh/id_ed25519' -N '' |
| Passphrase | Empty. -N '' so ssh-keygen is given an empty passphrase |
| Comment | you@example.com. Blank becomes generated-key |
| Filename | id_ed25519, even after you switch algorithm, until you edit it |
| RSA sizes | 2048, 3072, 4096. The menu opens on 4096 |
| ECDSA sizes | 256, 384, 521. The menu opens on 256 |
| Passphrase button | 20 characters from 71 symbols, shown in the text field |
| GitHub line | Always ssh -T git@github.com. The script does not upload the key |
The command updates as you type. Generate changes only the passphrase.
ED25519, RSA, or ECDSA. The bit menu appears only for RSA and ECDSA.
Starts as you@example.com and is passed with -C. A blank comment becomes generated-key.
Starts as id_ed25519 and is not rewritten when the algorithm changes. Blank uses the algorithm’s default name.
Empty by default, so -N is a pair of quotes. Generate fills 20 characters from a 71-character set.
The single ssh-keygen line, with -t, optional -b, -C, -f, and -N.
The command plus ssh-agent, ssh-add, a macOS pbcopy line, a commented xclip line, and ssh -T git@github.com.
Copy command on the untouched form.
ssh-keygen -t ed25519 -C 'you@example.com' -f '~/.ssh/id_ed25519' -N ''
| Flag | In this command |
|---|---|
| -t | ed25519, rsa, or ecdsa |
| -b | RSA or ECDSA only. Omitted for Ed25519 |
| -C | The comment, in single quotes |
| -f | '~/.ssh/' plus the filename, in single quotes |
| -N | The passphrase, in single quotes. Empty when the box is empty |
Copy script on the untouched form. The GitHub test stays on the last line even when the key is for another host.
# 1) Generate key pair ssh-keygen -t ed25519 -C 'you@example.com' -f '~/.ssh/id_ed25519' -N '' # 2) Start ssh-agent and add key eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 # 3) Copy public key pbcopy < ~/.ssh/id_ed25519.pub # macOS # xclip -sel clip < ~/.ssh/id_ed25519.pub # Linux # 4) Test connection (example for GitHub) ssh -T git@github.com
pbcopy is the line that runs on macOS. The Linux xclip line is a comment. There is no Windows copy command. ssh-add and pbcopy leave the path unquoted, while -f quotes it.
GitHub’s help says to run ssh -T git@github.com after the public key is added to the account, to confirm the fingerprint in the first-connection prompt against GitHub’s published fingerprint, and that a successful test still exits with code 1. This script stops at the clipboard. It does not open GitHub’s key settings.
Short definitions for the words on this page.
The OpenSSH program this page writes a command for. The page does not run it.
The default type. OpenSSH gives it a fixed length and ignores -b, so this command omits -b.
The new passphrase. An empty pair of quotes is an empty passphrase, not a prompt.
The public key OpenSSH writes beside the private key. The script sends that file to pbcopy.
GitHub’s connection test. It belongs after the public key is added to the GitHub account. This script does not do that step.
The default Ed25519 command, why -N is empty, and what the setup script does not do.
Explore more tools in the directory.