Chaining multiple SSH proxies
For
A->B->C->D->Internet
[hostA]$ ssh -2 -C -D 55557 -L 55556:127.0.0.1:55556 -L 55555:127.0.0.1:55555 user@B
[hostB]$ ssh -2 -C -D 55556 -L 55555:127.0.0.1:55555 user@C
[hostC]$ ssh -2 -C -D 55555 user@D
Note that for each hop, you need an additional matching forwarder
-L
on the previous hosts in the chain.References:
- ssh tunnel via multiple hops
- This posting shows how to chain an arbitrary number of proxies: http://sophiedogg.com/ssh-proxy-through-multiple-servers/
- The template for this solution: http://sysextra.blogspot.com/2013/10/multi-hop-ssh-socks-proxy.html
- How can I use SSH with a SOCKS 5 proxy?
- http://www.jethrocarr.com/2013/03/13/ssh-via-socks-proxies/
Comments
Post a Comment