rsnyc over ssh through scripting and cron...

Christoph Biedl
2006-01-29T19:04:14Z

Quinn Snyder wrote...

> I am aware of rsync
> being able to run over SSH, however I need this to be totally automated
(SSH
> opening, passwords sent and synchronized, files copied, and connections
> broken).

If I understand correctly your problem is the interactive ssh
authentification. You can replace this by using keys.

In a nutshell, on the sender side (that initiates the ssh connection):

ssh-keygen -t rsa

Just hit <ENTER> on all questions

On the receiver side (where the ssh server is running):
Copy the sender's .ssh/id_rsa.pub into .ssh/authorized_keys of the
according user.

Now you should be able to "ssh remote-user@remote" and get a shell
without authentification. Same for "rsync -av /path/to
remote:/path/to"

    Christoph