rsync through multiple ssh hops with password authentication prompt

Carson Gaspar carson at taltos.org
Thu Oct 27 13:46:35 GMT 2005


--On Thursday, October 20, 2005 12:53 PM -0700 Wayne Davison 
<wayned at samba.org> wrote:

> On Wed, Oct 19, 2005 at 10:29:21PM -0400, Matt McCutchen wrote:
>> $ ssh -L 2222:target:22 -N -f middleuser at middle
>> Password: middlepass
>
> Port-forwarding 22 is a great idea as long as ssh is configured not to
> complain about the host conflict -- nicely done.  I've added this to the
> FAQ in the "rsync through a firewall" section.

Hot keys aren't a problem if you use HostKeyAlias - see ssh_config(4). e.g.:

ssh -L 2022:remote-host.example.com:22 -N -d middle-host.example.com

Host remote-tunnel.example.com
        User remuser
        HostName 127.0.0.1
        Port 2022
        HostKeyAlias remote-host.example.com

rsync -aH /foo/ remote-tunnel.example.com:/bar/

-- 
Carson



More information about the rsync mailing list