Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have started up a vncserver on my home computer, running Ubuntu 10.10.

I enabled the ability for users to connect, and made it require a password

yesterday I tested this from Ubuntu by typing

vncviewer localhost:1

and I was able to see my desktop.

Now I am at work using CentOS and I type: vncviewer x.x.x.x:1 and I am unable to connect.

What should I do to allow for remote desktop over the internet to my home computer? I'd also settle for just being able to get to a terminal on my home computer if the full desktop is not recommended. Thanks!


CentOS machine is over the internet. Networking setup at home is the computer is connected directly to DSL modem.

share|improve this question
x.x.x.x isn't a valid IP address ;) But seriously - you haven't given us enough information. Where is the CentOS machine in relation to the Ubuntu one? What is your networking setup? Please give us more clues to help you with. – Majenko Mar 31 '11 at 15:18
Edited post: basically the ubuntu install is right out of the box, and i followed these instructions: – Derek Mar 31 '11 at 15:27
@Matt: But it is a valid DNS name. – grawity Mar 31 '11 at 16:16
@grawity :P~~~~ – Majenko Mar 31 '11 at 16:42

To make incoming connections, you usually have to set up port forwarding in your home network's router. For VNC, it's TCP ports 5900+n, where n is the display number. For :1, it would be 5901.

However, since VNC lacks any security measures (beyond an optional password which is sent in plain text), it would be more secure to tunnel the connection over SSH.

Install openssh-server on Ubuntu, forward the SSH port tcp/22 instead of VNC, and connect from CentOS with:

ssh -fNL 5911:localhost:5901 ubuntubox.domain.tld
vncviewer localhost:11
share|improve this answer
Before you ask: The "DSL modem" is in fact a router (with DSL support). – grawity Mar 31 '11 at 15:32
I will keep this in mind for later. RIght now the ubuntu box is connected directly to DSL modem – Derek Mar 31 '11 at 15:33
Ninja edited! haha – Derek Mar 31 '11 at 15:34

This probably won't work. Unless you have a static IP address, you will not be able to connect to a home network using normal means. You could use a service like FreeDNS or DynDNS. There is a nice tutorial about how set up a system like this. I don't think you need to actually buy a domain though, I think you can camp on someone else's. Anyway, here's what happens:

  • Your IP address can change frequently
  • Your computer will talk to FreeDNS and tell it when it's IP changes
  • FreeDNS will route all traffic to your computer

When you get this set up, you will need use a command like this:

vncviewer yourdomain:port where yourdomain is the domain registered through FreeDNS or DynDNS and port is the port your vnc server is running on.

It's not too complicated... I set this up in an afternoon and I can access my desktop from anywhere.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .