My dev machine, bsdev, is behind a firewall with only port 22 open for SSH.
Want to access the VNC server running on it on port 5901 from your Windows machine?
Simple:
1/ Open putty, go to connection/ssh/tunnels
2/ Input your settings
In Source Port: 5901 (or any other port, it’s gonna be the local port on the client machine, just make sure it’s available)
In Destination: bsdev.example.com:5901 (this 5901 is important, it’s where the actual VNC server is running)
Then click “Add”, select the newly created entry, then click “Open”.
3/ Your user/pass on bsdev is asked, enter it and you get a shell
4/ Point your browser to localhost:5901
It prints just “RFB 003.008″ on the page, probably the VNC version or identifier.
Now start your VNC a point it to localhost:1 (1 maps to 5901)
The VNC should start as if connecting directly to bsdev.