"Kelly Corbin,,," <kcorbin@theiqgroup.com> writes:
I'm trying to setup a cron job to sync two servers using ssh and rsync. The
problem is I'm promted for a password; which won't work when I stick it in
cron. Here's the syntax of my command line:
rsync -vnaz --rsh=ssh --delete somehost.com:/var/www/ /var/www/
Any ideas? Thanks!
Why were you thinking you wouldn't be prompted for a password? In
order to do passwordless ssh you need to do the following:
1) On your local system run ssh-keygen and use a good passphrase when
prompted
2) Copy the contents of ~/.ssh/identity.pub from the local system to
~/.ssh/authorized_keys on the remote system.
3) Make sure your ssh daemon on the remote system has, at least, the
following in it's configuration file:
RSAAuthentication yes
That should get you going for passwordless ssh between the two.
Gary