connecting to rsync daemon via ssh - Tools

This is a discussion on connecting to rsync daemon via ssh - Tools ; On two Solaris boxes (Solaris 8), I am trying to connect to an rsync daemon through an ssh tunnel. I have read the FAQ and both manuals and what is documented does not seem to work... Connecting Directly: server# cat ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: connecting to rsync daemon via ssh

  1. connecting to rsync daemon via ssh

    On two Solaris boxes (Solaris 8), I am trying to connect to an rsync
    daemon through an ssh tunnel. I have read the FAQ and both manuals and
    what is documented does not seem to work...

    Connecting Directly:
    server# cat /opt/local/etc/rsync.conf
    log file = /opt/local/log/rsyncd.log
    pid file = /opt/local/log/rsyncd.pid

    [test]
    comment = Testing deamon options
    path = /tmp/rsync
    list = true

    server# /opt/local/bin/rsync -vv --daemon
    --config=/opt/local/etc/rsyncd.conf

    client% /opt/local/bin/rsync -av --rsync-path=/opt/local/bin/rsync
    server::test
    receiving file list ... done
    drwxrwxr-x 420 2005/12/05 18:25:40 .
    -rw-rw-r-- 0 2005/12/05 18:26:01 a
    -rw-rw-r-- 0 2005/12/05 18:26:04 bunch
    -rw-rw-r-- 0 2005/12/05 18:26:11 dummy
    -rw-rw-r-- 0 2005/12/05 18:26:14 files
    -rw-rw-r-- 0 2005/12/05 18:26:07 of

    sent 81 bytes received 148 bytes 458.00 bytes/sec
    total size is 0 speedup is 0.00

    Works great... But now I want to connect via ssh:
    client$ /opt/local/bin/rsync -vv -e "ssh -l myuser" -av
    --rsync-path=/opt/local/bin/rsync server::test .
    opening connection using ssh -l myuser server /opt/local/bin/rsync
    --server --daemon .
    rsync: connection unexpectedly closed (0 bytes received so far)
    [receiver]
    rsync error: error in rsync protocol data stream (code 12) at
    io.c(434)

    And there is nothing in the log file.

    This is eventually going through a firewalled connection that I don't
    want to open 873 up and I would like the transfer to be encrypted --
    hence doing this over SSH.

    Any sugestions would be great!


  2. Re: connecting to rsync daemon via ssh

    Ops... I am running version 2.6.6.


  3. Re: connecting to rsync daemon via ssh

    Ok, I have several solutions but none I like::

    1) Create a tunnel outside the rsync process...
    ssh -L 10355:server:873 server sleep 9999999 &
    sleep 1
    netstat -an | egrep 10355
    rsync -vv -a --port=10355 localhost::test
    This can lead to hung connections since the ssh never is cleanly killed
    and bash never liked a "kill %1" command.

    2) Copy the rsyncd.conf into my home directory (or create a link to
    the server version).

    This worked and I will probably run with this one for now, but in the
    event someone goes and tries to clean up a home directory, this could
    easily break. ## Must Document this one.

    -- Better one that did not work --
    In an older article:
    http://lists.samba.org/archive/rsync...ry/008736.html

    A key file was suggested. This caused a prompt to come up and it still
    failed to have the right pathing. Here is what the key-file had:
    command="/opt/local/bin/rsync --server --daemon --config
    /opt/local/etc/rsyncd.conf"

    If anyone has a better solution, please pass it along.

    Chris


+ Reply to Thread