rsync via ssh tunnel
Wayne Davison
wayned at samba.org
Wed Sep 8 07:53:23 GMT 2004
On Wed, Sep 08, 2004 at 09:42:32AM +0200, Radio Gong 2000 GmbH & Co. KG [Technik] wrote:
> I want to put these two commands in just one command:
>
> ssh -i ~/.ssh/id_dsa -C -l sascha -L 873:rsync-server:873 bridge-server
> rsync -auz rsync://user@localhost/share /local-path
This was covered a few weeks ago on the mailing list. While you can't
combine them into a single command, you can run a simple sleep remotely
via the first command and then have the second command use the forwarded
port before the sleep goes away (which will keep the connection open
after the sleep command terminates). Like this (adding -f and sleep 40):
ssh -f -i ~/.ssh/id_dsa -C -l sascha -L 873:rsync-server:873 bridge-server sleep 40
rsync -auz rsync://user@localhost/share /local-path
..wayne..
More information about the rsync
mailing list