Link to home
Start Free TrialLog in
Avatar of carillian
carillian

asked on

RSYNC over SSH to the DAEMON

Hi
I want to RSYNC via SSH (for encryption only) to a remote server and use the Daemon to allow/grant access access to the modules using the normal auth users option.  


I am have tried the following syntax,
RSYNC -va -e ssh.exe auth_user@1.2.3.4::module_name
and
RSYNC -v -e "ssh.exe ssh_user@1.2.3.4" auth_user@1.2.3.4::module_name

but,
ssh.exe ssh_user@1.2.3.4
works fine as I have the public/private keys setup.

Any ideas anyone? Is this possible?  Certainly likes it it from the manual but can't quite get it to work!

Thanks
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

NB Linux is case sensitive!

rsync lower case please:)

What you are trying to do is possible, but I'm not sure that it is possible to do using the approach that you are using. Try this approach:

1.    First create the encrypted tunnel from tcp port 837 on the remote server to a port on your local machine. This ensures that the transmissions to/from the remote rsync server are encrypted:

ssh -l username -L 837:hostname:837

2.    rsync as required with the the rsync server address as 127.0.0.1 or localhost.

I also note that you are referring to 'ssh.exe'. Is the local or remote system a windows system? Running cygwin? Commercial software? More information enables the experts to produce a better answer.

Avatar of sumpi
sumpi

I assume, you want to do this on a windows box.
Now try the following:

set PATH=c:\Programme\rsync;%PATH%
set CYGWIN=tty binmode
set TERM=ansi
rem set RSYNC_RSH=c:\Programme\rsync\ssh.exe
set RSYNC_RSH=/cygdrive/c/rsync/ssh.exe
set USERNAME=ssh_user
set HOME=c:\Programme\rsync

c:\Programme\rsync\rsync -e ssh  -avz "/cygdrive/e/your_folder" 1.2.3.4:/backup/ >> c:\Programme\rsync\loguser.txt 2>&1

Your ssh - user should be the same as your rsync - user!

hth!
Sumpi
Avatar of carillian

ASKER

But this looks like this not using the daemon for authentication, you're ssh'ing straight in and just running rsync against it.
The manual shows usage of ssh to the daemon (:: format) but I cannot get to work in that configuration.
We are running win32 to linux rsync daemon.
Due to security issues across the internet we need this encapsulating, one way is to use SSH for transport but then we lose authentication to the daemon, the only other way is via STUNNEL which I'm playing with at the moment.
ASKER CERTIFIED SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial