Skip to content

Instantly share code, notes, and snippets.

@og-shawn-crigger
Created June 20, 2013 15:16
Show Gist options
  • Save og-shawn-crigger/5823652 to your computer and use it in GitHub Desktop.
Save og-shawn-crigger/5823652 to your computer and use it in GitHub Desktop.
Copy your ssh public key to a server from a machine that doesn't have ssh-copy-id If you use Mac OS X or some other *nix variant that doesn't come with ssh-copy-id, this one-liner will allow you to add your public key to a remote machine so you can subsequently ssh to that machine without a password.
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
@og-shawn-crigger
Copy link
Author

I like that one much better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment