This example is one method of setting up a secure VNC session tunneling over SSH. It assumes a VNC server has been installed on the remote system.
Windows
Download and unzip MobaXterm Home Edition (portable edition)
Open MobaXterm and start local terminal
SSH into the remote system
- Run the command vncpasswd to create a VNC session password. It is separate than your login password, but can be set the same
- The vncpasswd command can also change/reset an existing password
- The vncpasswd command will create a ~/.vnc directory if it does not exist
- If needed, edit the file ~/.vnc/xstartup
Start vncserver
After the vncserver is running, in MobaXterm select the Session icon to configure the VNC session
Select VNC and enter localhost in the remote hostname and select the port the vncserver was started on like 5902 in the set above
Select SSH gateway (jump host) under the Network settings
In the SSH jump host enter the remote system name and your logon name
Select the Bookmark settings and change the session name from localhost to the remote system name
When you connect (execute) the session, it will first ask for your remote system password, then ask for your vncpasswd