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
Prune Docker Objects and Free up Space Read tip
Support ESM and CommonJS Uses of Your Library Read tip
Large Node.js Project Example to Learn From Read tip