Thanks to a great suggestion by Nick Charlton, I decided to put together a screencast demonstrating how to set up public key authentication for logging into SSH servers on the Mac.
Setting up a keypair and then using it to log in to remote systems, instead of remembering separate usernames and passwords, can be a bit of a fiddly business, but I hope that in this screencast I can show how to get it set up.
Set Up Public Key Authentication for SSH on the Mac from Peter Upfold on Vimeo.
Take a look and let me know what you think!
This is something which I was trying to figure out a while ago, in order for automated rsync backups. It is essentially quite a simple thing I suppose, although there are so many different tutorials on it I ended up getting quite confused. In the end I got it working in a bodged up way, although one noticeable difference I found was to use the following command:
scp ~/.ssh/id_rsa.pub user@server:~/.ssh/authorized_keys
(From http://forum.slicehost.com/comments.php?DiscussionID=990)
In order to copy my public key across … but the problem with that is that it will clear out any other keys in there, but great tutorial! Will definitely use it for reference in the future (as I tend to forget these things 😉
Lee
The scp issue can be solved by using the following commands:
scp .ssh/id_dsa.pub daniel@linuxtwo:
…
cat id_dsa.pub >> .ssh/authorized_keys
See:
Howto setup SSH keys between machines
http://fedoranews.org/dowen/sshkeys/
Great stuff. A very great help – except…
I need to log on to VMS machines. I DO have on my PC this stuff set up and working (using Pageant and PuTTy) so I know that it should be possible. Following from what you describe here I did try creating the file sys$login:[ssh]authorized_keys with the contents of the public key. But no luck.
Any suggestions anyone?
Alan,
I don’t know anything about VMS or how that might differ from my server in this example (CentOS Linux), but you might try double-checking the permissions on everything to do with the SSH server on that machine. If one thing is slightly differing from the required permissions, logging on via a key will simply fail.
Peter,
Thanks for the great tutorial!! Your youtube video helped me out alot.
Michael