Skip to content

Instantly share code, notes, and snippets.

@vasanthela
Last active December 17, 2015 04:39
Show Gist options
  • Save vasanthela/5551959 to your computer and use it in GitHub Desktop.
Save vasanthela/5551959 to your computer and use it in GitHub Desktop.
Transfer ssh public key to remote server via ssh
# Works on Mac OS X
ssh remote.server.com "mkdir -p -m 700 .ssh; cat >> .ssh/authorized_keys; chmod 600 .ssh/authorized_keys;" < ~/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment