This is a commonly asked, and answered question. However, the solutions are not working for me, so I'd like a little help figuring out why not. I know I have done this successfully in the past.
I've looked at: VNC tunnel via SSH connection
http://crl.ucsd.edu/handbook/vnc/
http://martybugs.net/smoothwall/puttyvnc.cgi
I have PUTTY configured as follows:
I open the connection to serverA. Then
ssh -L 5901:localhost:5901 serverB
Once logged in I start a VNC session
-bash-4.1$ vncserver :1
New 'serverB:1 (balter)' desktop is serverB:1
Starting applications specified in /home/users/balter/.vnc/xstartup
Log file is /home/users/balter/.vnc/serverB:1.log
-bash-4.1$
I should be good to go, so I try to VNC to localhost
or localhost:0
or localhost:5900
. The connection fails.
Suggestions?
EDIT: I should have added that serverB is behind a firewall, so I need to use serverA as an intermediary.
EDIT 2 -- based on Nikita's comment:
Output of netstat -inpt
on serverB
-bash-4.1$ netstat -inpt
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
bond0 1500 0 25034847553 0 0 0 0 0 0 0 BMmRU
eth0 1500 0 7645087 0 0 0 148398 0 0 0 BMRU
eth4 1500 0 10494292891 0 0 0 0 0 0 0 BMsRU
eth5 1500 0 10644409020 0 0 0 0 0 0 0 BMRU
eth6 1500 0 14540554669 0 0 0 0 0 0 0 BMsRU
ib0 1500 0 5055 0 0 0 4267 0 1 0 BMRU
lo 65536 0 8932391289 0 0 0 8932391289 0 0 0 LRU
-bash-4.1$
How do I interpret this?