I am trying to use rsync over SSH, server runs rsync in daemon mode, client connects in with:
rsync -options user@server::folder /local/copy
This works fine. The problem is that SSH runs on a non-default port on the server, the following fails:
$rsync -options -e 'ssh -p 1234' user@server::folder /local/copy
#######################################
# Access to this server is prohibited #
########## Disconnect NOW! ############
#######################################
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [receiver=2.6.8]
But SSH works (its using keys):
[user@client ~]$ ssh -p 1234 user@server
#######################################
# Access to this server is prohibited #
########## Disconnect NOW! ############
#######################################
Last login: Thu Mar 31 09:18:08 2011 from 1.2.3.4
[user@server ~]$
How can I trouble shoot this? SSH works, rsync works, together, its not working. I have turned iptables off and as we can see above it does connect but rsync fails to connect to the defined folder?