Skip to content

Instantly share code, notes, and snippets.

@mpuz
Created April 1, 2020 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpuz/3a21ef7a551869c4aa5f83b814ebb65a to your computer and use it in GitHub Desktop.
Save mpuz/3a21ef7a551869c4aa5f83b814ebb65a to your computer and use it in GitHub Desktop.
copying SSH keys to server
cat ~/.ssh/id_rsa.pub | ssh user@222.22.22.2 "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment