An SSH key pair, generated by your browser
An SSH key replaces the password you use to log in to a server with a key pair: the public
key, placed on the server, and the private key, kept by the user. The generator
creates this pair with your browser's Web Crypto API, then writes it in OpenSSH format, the one expected by
ssh, Git and most clients:
- the public key on a single line,
ssh-ed25519 AAAA… comment(orssh-rsa AAAA…), ready forauthorized_keys; - the private key between the lines
-----BEGIN OPENSSH PRIVATE KEY-----and-----END OPENSSH PRIVATE KEY-----; - the
SHA256:…fingerprint, the same onessh-keygen -lfdisplays, to check that an installed key is the right one.
The keys never leave the page: it is not allowed to make a single network request.
Ed25519 or RSA 4096
Ed25519, the default, gives short keys that are fast to verify and robust. OpenSSH has supported it since version 6.5, released in 2014. RSA 4096 remains useful for an older server or device that does not know Ed25519; generating it can take a few seconds.
Ed25519 in Web Crypto requires a recent browser. If yours does not offer it, the page tells you: update it, or choose RSA 4096.
The comment helps you recognize the key in authorized_keys; it usually holds the
user and the machine, for example alice@laptop.
Install the key pair
- Add the public key, on a single line, to the
~/.ssh/authorized_keysfile of the account on the server. - Save the private key on the user's computer, for example as
~/.ssh/id_ed25519, keeping the BEGIN and END lines and ending the file with a line break: otherwise some versions of OpenSSH reject the key (“invalid format”). - On Linux and macOS, restrict its permissions with
chmod 600 ~/.ssh/id_ed25519: OpenSSH ignores a private key that other accounts can read. On Windows, the built-in OpenSSH client also checks the file's permissions. - Protect it with a passphrase. The private key is created without a passphrase; on
receipt, a single command encrypts it on disk:
ssh-keygen -p -f ~/.ssh/id_ed25519
Hand a key over to a team member
Best practice is for everyone to generate their own key on their own computer, with ssh-keygen or
this tool, and to share only the public key. When an administrator sets up access for a new team member
themselves, however, they have to get the private key to that person, and that key gives server access to
whoever holds it.
“Send with onlyU” sends the private key and the public key together. onlyU encrypts them in your browser and creates a link your team member can open only once, valid for 24 hours, after which the link disappears: the key does not linger in a mailbox or a chat channel. For the full step-by-step, read our guide on how to create an SSH key and add it to a server.