ssh tunnel via multiple hops
- by Mala
Tunneling data over ssh is pretty straight-forward:
ssh -D9999 [email protected]
sets up port 9999 on your localhost as a tunnel to foreignhost.com, but I have more specific need:
I am working locally on localhost
host1 is accessible to localhost
host2 only accepts connections from host1
I need to create a tunnel from localhost to host2
Effectively I want to create a "multi-hop" ssh tunnel. How can I do this? Ideally, I'd like to do this without needing to be superuser on any of the machines.