Leave this empty to use the name in the key comment. name@host becomes name.

One line, starting with ssh-ed25519 or ssh-rsa. Not the private key.

Clear

Connect

ssh user@host
ssh user@host -i ~/.ssh/id_ed25519

Linux already includes ssh-copy-id. On macOS, install it with Homebrew, then run ssh-copy-id user@host.

How to use it

  1. Paste the public key. Type a username, or leave it empty to use the key comment.
  2. Click Generate and copy the block for that system.
  3. Run it as root. Uncomment the sudo line on Debian and Ubuntu, or wheel on the other families, if this user should administer the machine.
  4. Connect with the private key. The RHEL-family block runs restorecon when SELinux is installed. CentOS uses that block.

Related tools

Prepare the same host with change hostname or a crontab.

Questions

Which key do I paste?

The public key, one line that starts with ssh-ed25519 or ssh-rsa. Leave the private key on the computer you connect from.

What if the username is empty?

The name is taken from the key comment. timmy.tin@prizm.digital becomes timmy.tin. A username you type is kept.

Why would SSH still ask for a password?

authorized_keys must be mode 600 and .ssh mode 700, owned by that user. On RHEL, Rocky, Alma, Fedora, Amazon Linux, and CentOS, SELinux also needs restorecon. Root login needs PermitRootLogin yes or prohibit-password.

Which command block do I run?

The block that names your system, as root. CentOS uses the RHEL block. Debian and Ubuntu use adduser. Alpine uses adduser -D.

Is the public key stored?

It is sent with the form so this page can build the commands. The commands are not saved as an account on this site.