Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

RSYNC over SSH to the DAEMON

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 84
Choosing CentOS 16 108
LINUX backups with VEEAM 8 118
SSL/TLS - openssl troubleshooting 3 39
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
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…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

839 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