Adding ssh-id-copy to OSX !

There’s a very convenient shell script bundled with some distributions of OpenSSH called ssh-copy-id. It seems not to be the case with Leopard’s or Lion’s SSH.
In order to get it, we can simply check it out of a GIT repository. Execute these two commands:

sudo curl 'https://raw.github.com/gist/1639381/eea46277ba544fcbd0a0768e8b3f854880ddb772/ssh-copy-id' -o /usr/bin/ssh-copy-id
sudo chmod +x /usr/bin/ssh-copy-id

Now execute ssh-id-copy like this:

MBP:~ martijn$ ssh-copy-id root@192.168.0.7
Now try logging into the machine, with "ssh 'root@192.168.0.7'", and check in:

~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.