Solved

RSYNC over SSH to the DAEMON

Posted on 2004-08-04
4
707 Views
Last Modified: 2013-12-15
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
0
Comment
Question by:carillian
  • 2
4 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 11755451
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.

0
 
LVL 1

Expert Comment

by:sumpi
ID: 11770294
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
0
 

Author Comment

by:carillian
ID: 11770383
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.
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 11826797
The approach that I outlined:

1.  Create using ssh an encryted tunnel from your local port to the remote port.

2.  rsync with the rsync daemon. Connecting to the rsync daemon on localhost port is then encrypted to the remote host.

Should still do exactly what you want under cygwin....Are you using cygwin, or something else on the windoze box?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now