I assume that you use a Unix-like operative system, but this apply to any OS.
Let’s say about a problem: you are in your office, you are waiting for some kind of simulation to end. Everything seems to go well, so you go home, quite confident that the next morning you’ll have some results to analyze.
Unfortunately, it’s unlikely to happen. Ten seconds after your departure, the program ends for a low-frequency bug that you missed.
Luckily, we have a solution for the future. Instead of losing a long night (or even a weekend) of program executions, you can check your office workstation when you are at home, in your warm bed, or everywhere you like to be (with an internet connection, ça va sans dire).
What do you need in your workstation?
You need to install (or ask the sysadmin to install):
- the ssh server
- a vnc server: x11vnc
Remember to ask the sysadmin:
- the public IP of your workstation
- the range of unused open ports, if the workstation is behind a router
What do you have to do from home?
Ok, now it’s very simple. You’ll only need to install a vncviewer, but you’ll probably already have one. Let’s say that your workstation username is goofy, the public IP is 18.104.22.168, and the free open port on the workstation is the 5900. Now we need another port, this time a local one (of your home computer), to create the http tunnel. I suggest the port 5901:
ssh -p 42 -L 5901:localhost:5900 firstname.lastname@example.org
You’ll have to insert your workstation password, and then you can explore with the shell your remote operative system. If you want to use it graphically, only execute the command:
Wait for 5-6 seconds, then open another shell without closing the current one, and type the following:
Et voilà! You have to move your mouse on the new black window, and then you’ll see the remote display to appear.