rsync on Freebsd 5.3

Greg Barniskis nalists at scls.lib.wi.us
Fri Aug 18 17:52:34 UTC 2006


Lisa Casey wrote:
> Hi,
> 
> I am trying to transfer all files in /var/mail from one Freebsd 5.3 
> machine (oldfreebsd.com) to another (newfreebsd.com). I decided to use 
> rsync for this since it would preserve ownership, permissions, etc. I 
> made sure rsync was installed on both machines. Neither machine had an 
> /etc/rsyncd.conf or /etc/rsyncd.motd file. On newfreebsd.com I created 
> /etc/rsyncd.conf thusly:
> 
> motd file = /etc/rsyncd.motd
> max connections = 1
> hosts allow = 208.44.xx.xx
> 
> (The IP address is that of oldfreebsd.com)
> 
> On newfreebsd.com, I created rsyncd.motd with the words Authorized Users 
> Only in it.
> 
> as a test, I'm just trying to rsync /var/mail/lisa from oldfreebsd.com 
> to newfreebsd.com. When that works I'll do all of /var/mail/
> 
> on oldfreebsd.com I cd /var/mail, then  type:  rsync lisa 
> newfreebsd.com:/var/mail/
> 
> and get this:
> 
> connect to host newfreebsd.com port 22: Connection refused
> rsync: connection unexpectedly closed (0 bytes read so far)
> rsync error: error in rsync protocol data stream (code 12) at io.c(348)
> 
> Anyone know what might be wrong? Or can anyone suggest a better way of 
> moving these mail boxes?

man rsync

"Modern" rsync wants to use SSH transport, not rsyncd. That's why 
it's trying for a connect to port 22 of the remote host, and the 
connection refusal is due to either an intermediate firewall block, 
TCP wrappers, etc. or else sshd is simply not running.

In this case, newfreebsd.com must be running sshd on accessible on 
port 22. Otherwise, you'll need to actually get rsyncd running and 
alter your invocation to use it (on port 873). Simplest, most secure 
fix is to make sure that newfreebsd.com is running sshd, and that 
should do it.

Put sshd_enable="YES" in /etc/rc.conf, tune /etc/ssh/sshd_config as 
needed, then start sshd by reboot or manually invoking its startup 
script.


-- 
Greg Barniskis, Computer Systems Integrator
South Central Library System (SCLS)
Library Interchange Network (LINK)
<gregb at scls.lib.wi.us>, (608) 266-6348


More information about the freebsd-questions mailing list