This is what ssh-copy-id does
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
If you are using Mac or other *nix flavor that doesn't have ssh-copy-id, the above is what you need. That's exactly what ssh-copy-id does :)
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
If you are using Mac or other *nix flavor that doesn't have ssh-copy-id, the above is what you need. That's exactly what ssh-copy-id does :)