Thursday, July 26, 2007

passwordless ssh/scp setup

I need to set up cron jobs which scp stuff all over the place. scp works best when you have rsa keys setup to allow you to ssh in without a password.

here are the steps to set this up (on solaris 8, possibly linux):

1) setup the public key and send it to the server
ssh-keygen -t rsa
[do not enter password when asked]
scp ~/.ssh/ [user]@[server]:~/

2) open a terminal on [server] and
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
cat ~/ >> ~/.ssh/authorized_keys
rm ~/

Done! That was easy!

Note: if the above doesnt work for some reason, make sure that you do this to the .ssh dirs on the SERVER you are trying to connect to:
chmod go-rxw .ssh


  1. Thanks! Couldn't be easier ;)

  2. best tut on this ever..!

  3. Of all the tutorials doing the same thing, this one is the easiest to follow. FYI: it works between a Ubuntu box and a Novell box just fine.