RSync and SSH problems

Olivier Thauvin olivier.thauvin at aerov.jussieu.fr
Mon Jul 18 17:09:52 GMT 2005


Le Monday 18 July 2005 18:26, vous avez écrit :
> Hey Olivier,
>
> Thanks for the reply.  The syntax you provided does work, but it doesn't
> grab the module path from my rsync.conf file.  In otherwords, when I
> specified ::module, it would look up that module name in the rsync.conf
> file and put the files in the corresponding directory.  When I use either
> just : or :/ prior to the module name, it simply creates a directory called
> "module" in the home directory of the ssh user and uploads the files there.

rsync look it"s rsyncd.conf only when it is started by as daemon iirc. So if 
you're using it with ssh, no way to use syntaxe ::module.

>
> What's the appropriate syntax to use the rsync.conf module path over ssh if
> :: doesn't work?  Or do they just have to specify the whole path
> (/cygdrive/c/module)?
>
> Thanks again, I appreciate your help!
>
> Mike
>
> -----Original Message-----
> From: Olivier Thauvin [mailto:olivier.thauvin at aerov.jussieu.fr]
> Sent: Monday, July 18, 2005 10:58 AM
> To: Roska, Mike
> Cc: rsync at lists.samba.org
> Subject: Re: RSync and SSH problems
>
> Le Monday 18 July 2005 17:42, vous avez écrit :
> > Hey all,
> >
> > First off, I'm new to cygwin, rsync, and actually even ssh. I've used
> > ssh clients many times, but server side I'm a bit of a noob. Anyway,
> > here's my problem...
> >
> > I set up a brand spankin new Windows XP box with only two apps
> > installed: copSSH and rsync. I need to tie down all security as tight as
> > possible. From what I've seen/read, it seems to me the only port I need
> > open on this server is 22 (for SSH). But for the sake of testing I've
> > also opened 873.
> >
> > I can connect directly to my rsync server (bypassing ssh) via the
> > following command:
> >
> > rsync *.* user at host.com::module
> >
> > Works like a charm. However, when I try what I believe to be the correct
> > SSH syntax:
> >
> > rsync -av --rsh="ssh -l sshuser" *.* user at host.com::module
> >
> > I get the following error:
> >
> > user at host.com's password: (enter it correctly)
> > rsync: read error: Connection reset by peer (104)
> > rsync error: error in rsync protocol data stream (code 12) at io.c(584)
> >
> > I've also tried just SSH'ing into the server and it works great. I can
> > run rsync as well so I'm not encountering any path issues. Lastly, I've
> > checked the rsync server log file and don't notice any entries when I
> > try and execute the ssh-esque command above.
> >
> > Am I missing some sort of syntax? Can anyone shed some light?
>
> The syntax is wrong:
>
> - ssh -l is not need as rsync will use the user in the url:
> rsync -av --rsh="ssh" *.* sshuser at host.com::module
>
> - the ::module does not work is you're using rsync with ssh, aka using ssh
> as pipe and not port forwarding. In this way rsync start ssh and use it to
> start the rsync on the remote host, all transfert are made using pipe. So
> this is somthing like:
> rsync options...| ssh user at remote rsync --server same_options...
>
> The module syntaxe '::module' only apply is your calling a remote rsync
> listening on its port.
>
> The correct syntaxe is:
> rsync -av --rsh="ssh" *.* sshuser at host.com:/full_path
>
> Nanar.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20050718/442d17b9/attachment.bin


More information about the rsync mailing list