110
86
SSH tunneling is very confusing to me. I am wondering if I can do this in Linux.
I have 3 machines..
A. My local machine at home.
B. Machine at work that I can SSH into (middle man).
C. My desktop at work that I can only SSH into from machine B.
So I can SSH from A -> B and from B -> C, but not from A -> C.
Is there a way to setup an SSH tunnel from A through B, so when I run other SSH commands it they just work from my local machine A? I am basically trying to clone a git repo from work to home (and I cannot install git on machine B).
Also, once setup.. How would I unset it as well?
i believe there's a duplicate question around somewhere but my search-fu is weak today. – quack quixote – 2010-02-11T21:53:25.457
2
Possible duplicate of An SSH tunnel via multiple hops
– Geza Kerecsenyi – 2018-11-24T14:47:16.037If you're running Linux on machine A, use a tool called sshuttle, which allows you to selectively forward all traffic for C thru the A->B tunnel (assuming C is visible from B). – joat – 2019-01-16T23:24:59.560
2
that would be mine: http://superuser.com/questions/96489/ssh-tunnel-via-multiple-hops
– Mala – 2012-05-03T07:23:09.853