Solved

RSYNC over SSH to the DAEMON

Posted on 2004-08-04
4
717 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

770 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