howto enable ssh on connect to rsync daemon

wilma wilma2002 at spray.se
Thu Oct 9 17:49:43 EST 2003


Hi,
I'm trying to setup automatic sync of files over SSH from node2 to node1.
node2 is the "server" and node1 is the "client".
I have setup rsync like this on the nodes which runs AIX (4.3.3 and 5.1):

1. Installed rsync from Linux Toolbox (rsync-2.5.4-1.aix4.3.ppc.rpm) on both nodes.
2. Added following to both nodes /etc/services file:
     rsync           873/tcp
3. Added following to node2 /etc/inetd.conf and refreshed inetd
     rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
4. Created /etc/rsyncd.conf on node2 with this content:
     log file = /var/log/rsyncd.log

     [resource]
             path = /path/to/resource
             comment = resource file area
             read only = yes
             auth users = user
             hosts allow = node1
             secrets file = /etc/rsyncd.secrets
5. Created /etc/rsyncd.secrets at mode 600 on node2 with this content:
user:password
6. Created a script on node1 to be used from cron with this content:
     #!/bin/ksh
     #
     LOG=/var/log/rsync.log
     export USER=user
     export RSYNC_RSH=ssh
     export RSYNC_PASSWORD=password
     
     echo $(date) >> $LOG
     echo "" >> $LOG
     
     rsync -av --delete node2::resource /path/to/localresource > $LOG 2>&1
     echo "**********************************************" >> $LOG

--------------------------------------------------------------------------------------------------------
The script runs fine, but I can see in an iptrace it does'nt use SSH. Instead it connects to port 873 on 
node2.
I have tried adding the flag --rsh "ssh" to the command but it tells me this:
"WARNING: --rsh or -e option ignored when connecting to rsync daemon"

Can someone please help how to set this up to go over SSH and without the need to supply a password?
Thanks in advance
-wilma-

____________________________________________________________
  Singelkryssen lättar ankar igen! Ta med kompisarna!
  http://www.spray.se/datekryss



More information about the rsync mailing list