Install SSH Key — ssh-copy-id Command Generator — desktop.engineer
Generate the ssh-copy-id command to install your public key into ~/.ssh/authorized_keys on a remote server.
Install your SSH public key with correct permissions
Copying your public key into ~/.ssh/authorized_keys on the remote server is how key-based SSH login is enabled. Use ssh-copy-id or the manual method, then make sure the file permissions are correct.
- ssh-copy-id -i ~/.ssh/id_ed25519.pub user@host — the recommended tool; it installs the key and sets the right permissions automatically (chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys).
- Manual method: cat ~/.ssh/id_ed25519.pub | ssh user@host "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
- After installation, verify the permissions on the server: chmod 600 ~/.ssh/authorized_keys, then test the connection with ssh user@host.
Generate your exact ssh-copy-id or manual command with the tool above, and refer to the chmod cheat sheet if SSH complains about authorized_keys permissions.
All tools