rsync through multiple ssh hops with password authentication prompt

Jay Fenlason fenlason at redhat.com
Fri Oct 21 15:55:22 GMT 2005


On Thu, Oct 20, 2005 at 12:53:08PM -0700, Wayne Davison 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.

If you have the keys for both hosts in your ~/.ssh/known_hosts file,
ssh doesn't complain at all, even with host checking enabled.

The fun part is getting both entries into the file in the first place.
I've been known to use methods like "mv ~/.ssh/known_hosts
 ~/.ssh/known_hosts.tmp ; ssh new-forwarded.host ; cat
 ~/.ssh/known_hosts.tmp >> ~/.ssh/known_hosts ; rm
 ~/.ssh/known_hosts.tmp" and simply cutting-n-pasting with a text
editor.

			-- JF


More information about the rsync mailing list