Category: How to..., Installation — UbuntuLinuxHelp @ 10:06 am —

A friend of mine (who’s a recent Linux convert), needed help with some tweaking of his Ubuntu based PC. He phoned me this morning, but it became evident that I actually had to “see” the system. It’s sometimes very hard to advise someone when you cannot actually see what they are doing. And it’s hard to follow instructions (sometimes) when you have to try and find what people are telling you to look for. I’ll bet many of us have been in that position before.

Finally, he got so frustrated and asked “Can’t you just come over here and show me?”. As I’m sure everyone reading this post can appreciate, sometimes it’s not possible to travel to the PC, to fix or tweak a (relatively) simple issue. I suggested a remote connection. Fortunately, I had already anticipated a remote connection (to several friends), so that it would be easier to help them in future. Before establishing remote connections to Ubuntu (in fact to any operating system), you’ll need to have a couple things in place.

1) You need to know the IP address of the PC you’re connecting to.

2) You need to have the router at the receiving end configured to accept connections.

Here’s what I did for this friend (let’s call him “Bob”). Several weeks ago I sat with Bob during his Ubuntu install (He was a Windows user, worried about making mistakes during the install). After the install, we configured “Port Forwarding” on his router. In essence, we told the router…

Any connection that comes in through external (WAN) port #xxxxxx, should be allowed and sent to internal (LAN) port #xxxxxx“.

(We also configured the router to limit the connection between the hours of 10:00 - 14:00. And we did configure a couple other security related settings).

In this case, the router was already set up, so all I needed was an IP address. Bob is not familiar with ifconfig or any other network configuration issues. Besides, we need his external (WAN) gateway IP, not his PC desktop (LAN) IP. Easy fix… In his case I told him to visit this page and see the info below:

ip How to: Easy Remote Access Connection to Ubuntu
(These addresses are not logged by the script that displays the IP addess above, it simply finds the variable “REMOTE_ADDR”).

Now that Bob could see his external IP address, he was able to tell me which IP address to connect to. In this case we’re using VNC to connect. I should point out that to do this in a secure manner, you must use encrypted SSH, the way I am describing this is insecure (because the connection is not encrypted). To keep this post a reasonable length, I’m skipping the “SSH” part and simply describing how to connect.

Side note: VNC should also be enabled on the remote computer:

Go to: System -> Preferences -> Remote Desktop to set this up. What are the settings?

Sharing
Allow other users to view your desktop (Check it on)
Allow other users to control your desktop (Check it on)

and…

Security
Ask you for confirmation (Un-Check so it’s turned off)
Require the user to enter this password: (Check it on)
Password: Type the password that will be used

Back to connecting… Bob told me that his IP address (from the little window above) said “72.138.xx.xx”. So here is what I enter (in a terminal) to connect from my PC to his PC:

vncviewer -fullscreen 72.138.xx.xx

And I was able to see his PC. This is the basic, it’s not difficult to do. Just make sure that the router at the remote location permits access (and that VNC is also enabled remotely).

If you are looking for more information, there’s a great guide here: http://www.debianadmin.com/remotely-manage-machines-using-vnc.html (Googling will find even more!) It’s Debian based, but the principles are pretty much the same in Ubuntu.

So… try enabling VNC connections. It’s a lot simpler, less stressful and you’ll be everyone’s friend! ;)

There are 3 comment(s) added so far...

#1

[…] A friend of mine (who’s a recent Linux convert), needed help with some tweaking of his Ubuntu based PC. He phoned me this morning, but it became evident that I actually had to “see” the system. It’s sometimes very hard to advise someone when you cannot actually see what they are doing. And it’s hard to follow instructions (sometimes) when you have to try and find what people are telling you to look for. I’ll bet many of us have been in that position before. Read more at Ubuntu Linux Help […]

#2

I prefer telling friend to paste ’ssh -R XX:localhost:YY myIP’ into terminal.

ciastek wrote on February 27, 2008 - 1:53 pm
#3

[…] external router (WAN) IP address. The script that runs in my “How to: Easy Remote Access Connection to Ubuntu” post will display it for […]

You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.