Be sure to read Part 1 and Part 2 of this series also.
I use some common Linux tools to remotely support my Grandparents’ PC. These tools are SSH and X11vnc. X11vnc lets me take over the display, and the VNC traffic is tunneled with SSH. They can be a bit of work to set up, but work beautifully.
If these servers are not installed, install them with this command:
sudo apt-get install openssh-server x11vnc
It is a good idea to change the SSH port because there are so many brute force attacks on port 22. Open the file /etc/ssh/sshd_config in a text editor and change the port to a high number. Then restart the SSH server to make the change take effect:
sudo /etc/init.d/ssh restart
Chances are that your average Grandparents don’t have a static IP address. To use SSH you need to know the current IP address of the remote computer. I use a free service called DynDNS to associate a domain with the remote computer. To do this, get a free account at DynDNS and add a dynamic DNS service. When setting it up, the important part is to choose a hostname and enter in the IP that it will initially point to.
Now you need to set up a client that will tell DynDNS if the PC’s IP address changes. I used the “inadyn” client that can be downloaded from here. To run it when the computer starts up, open xfce-autostart-editor and click “Add”. (If you are not using Xfce open the equivalent editor in your environment.) Your inadyn command should look like this:
inadyn -u username -p password -a hostname --iterations 1
Replace “username” and “password” with your DynDNS credentials. Replace “hostname” with the hostname you set up on DynDNS’ website. Once you run inadyn, you can test it by pinging the hostname you set up and making sure it resolves to the global IP of the computer you want it to point to.
Instead of leaving the X11vnc server running all the time, I prefer to SSH in and start it when I need it. The VNC traffic should also be tunneled through SSH to make it secure. Use the following command to connect to the remote computer and start a tunnel.
ssh -p 22 username@hostname -L 1111:localhost:5900
Replace “22” with the SSH port the SSH server is listening on. Replace “username” with a user on the remote computer and “hostname” with your DynDNS hostname. Port 5900 (the VNC port) on the remote computer will be forwarded to port 1111 on your computer. Now start X11vnc on the remote computer with the command line that opened:
If the connection is slow, I find it is best to scale down the VNC display. This is easy to do, just use the -s option with a fraction to scale by. This command starts X11vnc but scales the output by two-thirds:
x11vnc -usepw -scale 2/3
Now that the X11vnc server is running, it’s forwarded to your local port 1111 because of the SSH tunnel. You can connect to it from from the command line with this command:
That should prompt you for the password and open a window displaying the remote screen. Alternatively, you can connect in Gnome using the Terminal Server Client instead of vncviewer on the command line.
I just love the Linux tools for remote support, they are both powerful and secure. Almost any problem my Grandparents may have I can solve from my own computer. In the past when I ran Windows, I used LogMeIn which was easier to set up but less secure because the client was running all the time and connected through LogMeIn’s servers. That is it for this series, unless I can find some more topics on Linux for Grandparents. Thanks for reading!