ejlynch
04-24-2005, 09:34 PM
I want to ssh tunnel from my machine through two other machines to the destination.
Below is how I can get through
local -> host1 -> host2 -> remote
i can tunnel from local to hosts2 by setting up the tunnel on local as follows
ssh -l user -L 2500:host2:22 host1
and then
ssh -l user -p 2500 127.0.0.1
But how can I tunnel from local to remote ?
Also host2 is a router. I was thinking that it would be possible using the tunnel i have working and port forwarding via iptables from host2 to remote.
note:
local can only ssh to host1
host1 can only ssh to host2
host2 can only ssh to remote
Below is how I can get through
local -> host1 -> host2 -> remote
i can tunnel from local to hosts2 by setting up the tunnel on local as follows
ssh -l user -L 2500:host2:22 host1
and then
ssh -l user -p 2500 127.0.0.1
But how can I tunnel from local to remote ?
Also host2 is a router. I was thinking that it would be possible using the tunnel i have working and port forwarding via iptables from host2 to remote.
note:
local can only ssh to host1
host1 can only ssh to host2
host2 can only ssh to remote