Connect to Ubuntu remote desktop from CentOS

0

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!

edits:

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

Derek

Posted 2011-03-31T15:15:05.923

Reputation: 605

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 – 2011-03-31T15:18:30.397

Edited post: basically the ubuntu install is right out of the box, and i followed these instructions: http://www.ehow.com/how_5089245_install-vnc-server-ubuntu.html

– Derek – 2011-03-31T15:27:03.233

@Matt: But it is a valid DNS name. – user1686 – 2011-03-31T16:16:15.313

@grawity :P~~~~ – Majenko – 2011-03-31T16:42:42.167

Answers

0

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

user1686

Posted 2011-03-31T15:15:05.923

Reputation: 283 655

Before you ask: The "DSL modem" is in fact a router (with DSL support). – user1686 – 2011-03-31T15:32:02.403

I will keep this in mind for later. RIght now the ubuntu box is connected directly to DSL modem – Derek – 2011-03-31T15:33:45.320

Ninja edited! haha – Derek – 2011-03-31T15:34:12.247

0

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.

beatgammit

Posted 2011-03-31T15:15:05.923

Reputation: 1 387