jcanfield
6/20/2013 - 3:16 PM

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

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"