rsync through ssh tunnel
Olaf.Joerk at arbg.justiz.sachsen.de
Fri Jun 11 09:13:20 GMT 2004
I want to keep the content of some directories
on different Linux servers synchronal. I have on
every Linux server an account for connecting to
via ssh. This account has no root permissions.
But some directories require root priviledges.
I wand to use rsyncd as a deamon on the target
My Idea was to build a ssh tunnel first and then
using rsync via this tunnel.
ssh -S -l user -L2020:localhost:873 host
When I use rsync ...
.. everything works as expected. But when I want
to use rsync for the real work ...
+ rsync --rsh=/usr/local/bin/ssh --recursive \
--hard-links --perms --times --links \
--safe-links --one-file-system --relative \
--backup --backup-dir=/home/adv/rsync_backup \
'--suffix="-11.06.04"' --compress --timeout=180 \
--dry-run --verbose --stats \
FATAL: Connecting to rsync failed: No address associated to the name
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
.. I got this error message. When rsync wants to transfer
data, will it use the ssh tunnel or will it use ssh as the
user executing the script (ex. root) ? Will the data be
trandferred between ssh and sshd or rsync and rsyncd ?
I am confused about that. Any hints are welcomed.
Thanks in advance
More information about the rsync