0

I am trying to connect to a Ubuntu-10.04 Linux desktop at work place from my home computer(Vista) after connecting to office VPN. I have installed vnc4server package on that linux machine. Then I start vncserver manually at command line. When I try to connect to it from my home computer (Vista)using VNC viewer, it gives an error saying - Unable to connect to host. Connection refused(10061).

What could be the reason, and how can I resolve this?

2] I also have installed UltraVNC on my Home computer(Vista). I thought UltraVNC, infact does not need any server installed/running on the computer we are connecting to. Is it correct that using UltraVNC viewer, we can connect to remote machine(Linux/Windows) without any piece of S/W needed on that remote machine?

(For me connecting using UltraVNC also gave error saying - "Failed to connect".)

Any pointers to resolve these errors would help.

2 Answers 2

1

Check the port you are trying to connect to. When you start vnc4server it should tell you which display it is creating, eg:

jrt@tails:~$ vnc4server 

New 'tails:1 (jrt)' desktop is tails:1

Starting applications specified in /home/jrt/.vnc/xstartup
Log file is /home/jrt/.vnc/tails:1.log

So, I have X running already, therefore vnc4server has started a new X server, :1. By default VNC connects to port 5900 but in this case the VNC server will be listening on 5901.

On the linux machine, you could run the command:

netstat -atpn

and look for something along the lines of:

tcp6       0      0 [::]:5901               [::]:*                  LISTEN      2737/Xvnc4 

An alternative to VNC you might look at is FreeNX / nomachine.com.

2
  • +1 FreeNX. Way better user experience, and it tunnels over ssh by default.
    – emgee
    Oct 13, 2010 at 1:42
  • Indeed the port number i was using was the problem. Thanks for the soln.
    – goldenmean
    Oct 13, 2010 at 21:03
2

The connection refused problem can be caused by a couple of things. The first things to check are...

1) You are connecting to the correct IP address and port (DNS suffixes don't always automatically get added to hostnames so worth checking you can resolve the hostname from command line, just try pinging it see what comes back)

2) Check the server (your remote ubuntu machine at work) is configured to accept connection without prompt as the default is to prompt the remote machine for permission (or at least it used to be so still worth checking)

Finally whoever told you UltraVN viewer can connect to a machine without a server on the remote machine is talking rubbish. It would be a massive security concern if you could just remote into any computer.

You must log in to answer this question.

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