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/id_rsa.pub [user]@[server]:~/
2) open a terminal on [server] and
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
rm ~/id_rsa.pub
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
Thanks! Couldn't be easier ;)
ReplyDeletebest tut on this ever..!
ReplyDeleteOf 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.
ReplyDeleteThanks!
Thanks! So easy!
ReplyDelete