Skip to content

Instantly share code, notes, and snippets.

@DariuszO
Forked from kremalicious/sshkey.sh
Created December 4, 2019 12:14
Show Gist options
  • Save DariuszO/bcdf182fcd86053a7b2e808e572ed754 to your computer and use it in GitHub Desktop.
Save DariuszO/bcdf182fcd86053a7b2e808e572ed754 to your computer and use it in GitHub Desktop.
Add local public ssh key to server
cat ~/.ssh/id_rsa.pub | ssh user@hostname -i ~/.ssh/key.key 'cat >> .ssh/authorized_keys'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment