Sunday 22 October 2017

linux - VNC tunnel via SSH connection


Here is the situation:



  • Server 1 - I have direct SSH access to this machine.

  • Server 2 - Can only be accessed via Server 1 (SSH).


(Both Linux boxes.)


Is there a way to set up direct VNC access to Server 2 from a Windows box?



Answer



You should be able to do the same thing as described here. In your case you would use putty to connect to server1 through ssh but use the IP address or name of Server2 in the destination field instead of 'localhost'.


All the following steps are to be done on your windows system:


Open the main Putty screen:


Host Name: [your public IP or domain name for server1]
Port: [Use whatever port Server1 is configured to use]

Under the [SSH -> Tunnels] menu in putty:


Source port: 5000
Destination: [server2 internal IP address]:5900
Click Add
Click Open and type in the username and password

Open your VNC client. Different VNC clients might use different notations for specifying ports. If you use ultraVNC:


VNC Server: localhost:5000

Server2 needs to have a VNC server on it but it only needs to be visible to Server1 on the internal network.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...