Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as off topic by sysadmin1138 Nov 17 '11 at 20:38

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

You can use the ProxyCommand.

ssh -A -t 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 -t -L 8042: 'ssh test@ -t -L 8042: 'ssh -L 8042: admin@
share|improve this answer

If you want to connect from A (vnc client) to C (vnc server) you have to run the equivalent with putty of the following ssh command (on the host A):

 ssh -L

This command will make a tunnel from A to B and connect directly the tunnel to your host C.

Already on the host A, you just have to launch the vnc client to the loopback address localhost:5900

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.