how to connect to rsyncd via forwarded ssh port?
Matt McCutchen
matt at mattmccutchen.net
Tue Jan 13 05:03:05 GMT 2009
On Sat, 2009-01-10 at 22:32 +0100, Matthias Meyer wrote:
> I've running a rsyncd and ssh port forwarding (-R 12345:localhost:873 backup at server)
> on a client because the client should not reachable but over ssh.
> The rsyncd should acessible because I can backup and restore files with backuppc
> (a wonderfull program which use perl::rsync)
> And I can "ssh -p 12345 backup at localhost" to this client too.
>
> If I try to connect (from the machine/user where backuppc can connect) to a share
> of the clients rsyncd I get different errors:
>
> rsync -e "ssh -C -l backup -p 10021" -av /srv/Service/Installs/autosshpatch.bin backup at localhost:/BACKUP
> Seems to work. But it did not connect to the share BACKUP but copy
> the autosshpatch.bin in a file called BACKUP
Once you start the port forward, the rsync daemon is listening at
localhost:12345 as far as your rsync command is concerned. The command
should just access the daemon at that port using the double-colon or
rsync:// syntax without specifying anything ssh-related, and the
existing ssh process will take care of the forwarding:
rsync -av -p 12345 /srv/Service/Installs/autosshpatch.bin localhost::BACKUP
Alternatively:
rsync -av /srv/Service/Installs/autosshpatch.bin rsync://localhost:12345/BACKUP
--
Matt
More information about the rsync
mailing list