Tuesday, November 4, 2014

vnc - Tunnel SSH from A->B->C




I'm looking to setup a tunnel using PuTTY on Windows.



Ideally I'd SSH directly from A->C, however, I can't from the network I'm on. I can, however connected from A->B->C.



C is running a vncserver, which I'd like to connect to from A.



How can I tunnel through SSH from A->B->C?


Answer



You can use the ProxyCommand.




ssh -A -t ruapehu.example.com ssh -A -t aoraki ssh -A tongariro


There's a good article on the topic on SSHMenu (which is for Linux).



You mentioned PuTTY and so here's something to read after the above article.



If you meant to ssh a specific port, you can always try something like this:




ssh test@example.com -t -L 8042:127.0.0.1:8042 'ssh test@192.168.33.3 -t -L 8042:127.0.0.1:8042 'ssh -L 8042:192.170.1.1:80 admin@192.168.69.69

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...