Rsync-ing from remote to remote

tim.conway at tim.conway at
Fri Sep 13 15:09:01 EST 2002

You're right, in that you can't go remote-to-remote the way rcp can, but 
not about the man page, which explicitely rules out this functionality:

     Note that in all cases (other than listing) at least one  of
     the source and destination paths must be local.

     See the file README for installation instructions.

SunOS 5.7            Last change: 1 Mar 1999                    2

User Commands                                            rsync(1)
You can do what you are attempting, though, fairly easily, as it is plain 
from your example commandline that you are permitted to ssh.  Set up one 
of them to be able to ssh to the other, and 
ssh foo "rsync --rsh=ssh --archive /data/* bar:/data/"
or, if you don't want to let foo rsh to bar,
ssh bar "rsync --rsh=ssh --archive foo:/data/* /data/"
If you don't want either to be able to ssh out, you'll have to use a local 
staging area.

Tim Conway
tim.conway at
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"

"Schmitt, Martin (Dregis STB C)" <Martin.Schmitt at>
Sent by: rsync-admin at
09/13/2002 03:43 AM

        To:     "'rsync at'" <rsync at>
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Rsync-ing from remote to remote

Hi everyone!

I'm trying to do something along those lines:

rsync --rsh=ssh --archive foo:/data/* bar:/data/

Where foo is on the other side of a firewall, bar has no network 
to foo, and the machine I'm executing this on can connect to both of them.

Unfortunately, copying from remote to remote doesn't seem to be possible
with rsync. There's no mention in the Manpage as well, so I guess that
functionality really isn't there.

Do you know some kind of work-around for this? Weird stuff involving 
from one rsync command into another maybe? Or did I miss something in the

Thanks in advance for all hints,

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list