How can I secure connections between Windows rsync clients and cwRsync servers ?

 
On WINSERVER:
 Install cwRsync Server and Copssh into the same directory. 

  • Start RsyncServer and OpenSSHD services
  • Activate a user (test1 in our example below) via Copssh control panel and specify c:\backup as home directory.
  • Add a new module to rsyncd.conf :


path = /cygdrive/c/backup
read only = false
transfer logging = yes

 

on WINCLIENT :

  • Download cwRsync client
  • Create a batch file for automation (the example below copies contents of c:\windows\fonts\s* to the  directory behind the rsync module test  at the server side via a secure ssh tunnel:
@ECHO OFF
SET CWRSYNC_DIR=C:\cwrsync_client_x64
SET CHANNEL_ID=Secure_Channel_ABC
SET LOCALPORT=9119
SET REMOTEPORT=873
SET REMOTEHOST=192.168.100.21
SET REMOTEUSER=lab1user
SET RSYNCMODULE=test
SET SOURCEDIR=/cygdrive/c/windows/fonts/s*

echo Establish secure channel ...
start "%CHANNEL_ID%" /MIN %CWRSYNC_DIR%\bin\ssh -L %LOCALPORT%:127.0.0.1:%REMOTEPORT% %REMOTEUSER%@%REMOTEHOST% -T -N -f

"%CWRSYNC_DIR%\bin\rsync" -vrt %SOURCEDIR% "rsync://localhost:%LOCALPORT%/%RSYNCMODULE%"

echo Terminate secure channel ...
taskkill /FI "WINDOWTITLE eq %CHANNEL_ID%"