unable to connect to host: connection refused (11061)
stamhankar01 "at" gw.hamline.edu
Wed Jan 18 16:48:55 2006
Thanks James, Stewart and Raj for your messages!
Switching the ssh -L command around helped. I had tried it before, but I
think I was doing another silly thing that was causing the problem: I
was typing localhost :0 instead of localhost:0. The space was creating
the problem, I guess.
I couldn't start "vncserver :0" on my work.machine because of a
/tmp/.X0-lock file belonging to root that I could not remove. Typing
just "vncserver" on work.machine automatically chooses :1. When I type
"vncserver :0", after the warning about .X0-lock file, it also says "A
VNC server is already running as :0". This is confusing, because ps does
not show any instance of Xvnc associated with it.
I don't think I'll need to run vncserver on my home computer, but if I
did, how would I resolve the conflict of both ssh and vncserver using
the same port? Could I type "vncserver :2" on my home machine?
By the way, when I only downloaded vncviewer, somehow it never gave me
the window to set up password, nor could I find an option where I could
set it up. That is why I downloaded the server, but made it a point to
not start the server on my home computer (I did this once on another
computer, and the vnc was simply making infinite copies of itself!)
Thanks for all your help!
>>> stewart "at" sibecker.co.uk 01/18/06 6:09 AM >>>
Your ssh command takes local port 5901 from your home computer, and
it to port 5900 on the work computer. However, your work computer is
listening on port 5901. Also, your VNC command wants to connect to port
5900 on your home computer, which isn't doing anything. (This leads me
guess that your home PC is not running a VNC server, correct?).
that your ssh connection is successful, and that your work machine
you (that is, the me "at" work.machine user), then all you need to do is
correctly match up your ports, which you can do by either, but not both,
the methods below.
On the work machine type "vncserver :0" or just "vncserver" to start it;
will then listen on port 5900. When you connect, type "localhost:1".
option will means that your work machine will listen on the expected
form VNC, and also that you can run a VNC server on your home machine
also listens on port 5900 that will work correctly when the ssh
Change the ssh command to: "ssh -L 5900:localhost:5901 me "at" work.machine".
Note that this option will create a clash with a VNC server running on
home machine on the default port, should you decide to set one up, since
both the VNC server and ssh will try to listen on that port.
Doing both of the above will cause the problem you had before to
since you will have swapped ports at each end.
Also, like Jaroslaw said, make sure that your ssh server permits
If it is not permitted, you won't get any messages to that effect when
start ssh: the terminal side will still function but the tunnelling part
will be silently dropped.
Hope this helps,
Stewart [NutmeG] Becker
----- Original Message -----
From: "Sonali Tamhankar" <stamhankar01 "at" gw.hamline.edu>
To: <vnc-list "at" realvnc.com>
Sent: Wednesday, January 18, 2006 11:25 AM
Subject: unable to connect to host: connection refused (11061)
> I am having trouble using vnc from my home computer. I just installed
> viewer and server but did not click "start the server" box. I set up
> password. Then I logged onto my work machine with the command "ssh -L
> 5901:localhost:5900 me "at" work.machine". I did type "vncserver :1" on my
> work machine, and ps tells me Xvnc is running on that machine. Now if
> try to run vnc viewer from my home computer, and type "localhost" for
> server name, I get the above message. Can someone please tell me why
> this might be happening?
> Thanks so much,
> - Sonali.
> VNC-List mailing list
> VNC-List "at" realvnc.com
> To remove yourself from the list visit:
VNC-List mailing list
VNC-List "at" realvnc.com
To remove yourself from the list visit: