First off, I'm new to cygwin, rsync, and actually even ssh. I've used 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 *.* email@example.com::module
Works like a charm. However, when I try what I believe to be the correct SSH syntax, which is:
rsync -av --rsh="ssh -l sshuser" *.* firstname.lastname@example.org::module
I get the following error:
email@example.com's password: (entered it incorrectly)
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?
Sorry, that should say "entered it correctly" after the SSH password promt.
Your command rsync -av --rsh="ssh -l sshuser" *.* firstname.lastname@example.org::module is correct to initiate a connection to a rsync daemon via ssh by using built-in ssh support in rsync.
However, this method is known to be unstable in cygwin context (well, that was the case a year ago!!). That's the reason why cwRsync server does not support it. Direct ssh-tunnelling is recommended way to establish secure rsync transfers to cwRsync servers.
For windows clients, you can use the Secure Channel Wizard to create a batch file, which also can be an example for other platforms.