Skip to content

Instantly share code, notes, and snippets.

@estebistec
Created July 11, 2012 18:36
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 estebistec/3092237 to your computer and use it in GitHub Desktop.
Save estebistec/3092237 to your computer and use it in GitHub Desktop.
Distribute public key
# I always forget this command snippet and especially that ssh refuses if file privs aren't just so
cat ~/.ssh/id_rsa.pub | ssh user@remote-host "mkdir -p .ssh; chmod 700 .ssh; cat >> .ssh/authorized_keys2; chmod 600 .ssh/authorized_keys2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment