SSH Tunneling on Linux, macOS, and other unix-like OSes

If you run Linux, macOS, or any other Unix you can easily create a tunnel using the following ssh commands from a terminal.

Open an terminal, and type the following:

   ssh -X -Y -C -g -L 59XX:localhost:59YY YYYYSPPP@128.171.165.6

Once the ssh tunnel has been set up, you run the vnc client on the local machine from a second terminal or from the menus, and connect to the server localhost:59XX. It is very important that you not start the vnc client in the same terminal that is logged into stefan, as it will be extremely slow due to the fact that the vnc client is being exported from stefan to your local host.

Here is an example. In two terminals on the local client machine:

   ssh -L 5901:localhost:5909 2015A001@128.171.165.6
   vncviewer localhost:5901

This example opens the session on stefan:9.