I am using PuTTY to connect to a distant network to then set up x11vnc and then using ssl/sshvnc as a client.

in the host name for PuTTY I have: ssh.inf.uk

and port: 22

in the ssh tunnel options I have source port set to: 5910

and destination: markinch.inf.uk

Then putty brings up an xterm and I am prompted for my username and password. I get to the common gateway machine and do

ssh markinch

then I set up the x11vnc server

x11vnc -ssl -usepw -rfbport 5910 -create -geometry 1200x800

I use ssl/ssh vnc viewer with the verify certs off and host port set to, localhost:10 and put the password, and connect fine.

---Now I want to bypass usuing PuTTY, and do the ssh connection via command line. So I do

 ssh -L localhost:5910:ssh.inf.uk:5910 vass@ssh.inf.uk

which brings me into the gateway machine, then I need to log into a specific desktop

 ssh -L localhost:5910:markinch.inf.uk:5910 markinch

Then I set up the x11vnc server,

x11vnc -ssl -usepw -rfbport 5910 -create -geometry 1200x800

then I use ssl/ssh vnc viewer with verify certificates off, localhost:10, and with the password in, and get: PORT=5910


channel 3: open failed: connect failed: Connection refused

What is putty doing so different? Best,


In your putty config, the traffic is exiting the tunnel at ssh.inf.uk and being forwarded directly to markinch.inf.uk. So you're only building 1 tunnel.

In your ssh statements, you're building 2 tunnels - one from localhost to ssh.inf.uk, and a second from ssh.inf.uk to markinch.inf.uk.

I haven't yet worked out why the 2-tunnel solution isn't working for you. However, you might try adjusting your ssh command to match what putty's doing and see if that works.

  ssh -L localhost:5910:markinch.inf.uk vass@ssh.inf.uk
  • OMG, that worked, just that the command needed "ssh -L localhost:5910:markinch.inf.uk:5910 vass@ssh.inf.uk" but why, its so strange?!?! the concept just doesn't make any sense – Vass Oct 21 '10 at 18:20
  • I think its because the first computer you log into then connects you directly to markinch bypassing it from further communication to reduce unecessary communication overhead. (?) and by the time you put the vnc client on you are already connected directly to markinch. (?) – Vass Oct 23 '10 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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