coder wanted

Jan-Benedict Glaw jbglaw at
Thu May 6 09:04:32 GMT 2004

On Wed, 2004-05-05 19:00:28 -0800, Web Hosting Network <hosting at>
wrote in message <E1BLZ7l-0005p8-D7 at>:


So you want user_1 at machine_1 to rsync machine_1:/some/path to
user_2 at machine2 in a path machine_2:/some/other/path ? This should be
done via ssh, right? Easy, that.

- On machine_2, create ~/.ssh as a directory (if it doesn't already exist)

- On machine_1, do:
	$ mkdir ~/.ssh
	$ cd ~/.ssh
	$ ssh-keygen -f rsync-key -t rsa -C "key for rsync"
	(-> NO password)
	$ cat | ssh user_2 at machine_2 "cat >> ~/.ssh/authorized_keys"
	$ ssh user_2 at machine_2 "chmod 0640 ~/.ssh/authorized_keys"

	(This created a ssh key and allows user_1 to log in as user_2 on
	machine_2 without password)

Now, ssh'ing into machine_2 with user_2 should work, try it:

	machine_1 $>  ssh -i ~/.ssh/rsync-key user_2 at machine_2

That should work, now the rsync part:

	machine_1 $>  rsync --rsh="ssh -i /home/user_1/.ssh/rsync-key" -avz /path/to/your/files/ user_2 at machine_2:/path/to/backup

That should work, too, so you can place that command into user_1's
crontab file. rsync's options (I choose -avz here) depend on what you
actually want to achieve, you didn't tell that exactly enough so I took
something that basically does a backup (-a), is a bit verbose (-v) and
compresses data over the link (-z). Especially -z is only wise if you've
got a slow link in between and fast CPUs. Omit it if you're in LAN with
not-that-fast CPUs.


   Jan-Benedict Glaw       jbglaw at    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the rsync mailing list