Skip to content

Add Public Key to Server With ssh-copy-id

View on Twitter

💡 To SSH into a server using a key pair you need to add your public key to the server's "authorized_keys" file.

Besides old-school copy-pasting your public key into the file, you can also use ssh-copy-id:

👉🏼 `ssh-copy-id -i ~/.ssh/mykey.pub user@host`

Download the VPS Security Cheatsheet

Use this FREE security cheatsheet to not miss a step when securing your VPS.

A preview of the VPS Security Cheatsheet.

You'll also get tips on building scalable Node.js applications about twice a month. I respect your email privacy. Unsubscribe any time.

You might also like
Validate Github Action Workflow in VSCode Read tip
Automatic Restart on System Reboot With PM2 Read tip
Secure Your VPS: Enable Automatic Updates Read tip