unable to connect to host: connection refused (11061)
Sonali Tamhankar
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!
Cheers,
- Sonali.
>>> stewart "at" sibecker.co.uk 01/18/06 6:09 AM >>>
Your ssh command takes local port 5901 from your home computer, and
forwards
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
to
guess that your home PC is not running a VNC server, correct?).
Assuming
that your ssh connection is successful, and that your work machine
permits
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,
of
the methods below.
Either:
On the work machine type "vncserver :0" or just "vncserver" to start it;
it
will then listen on port 5900. When you connect, type "localhost:1".
This
option will means that your work machine will listen on the expected
port
form VNC, and also that you can run a VNC server on your home machine
that
also listens on port 5900 that will work correctly when the ssh
connection
is established.
Or:
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
your
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
re-appear,
since you will have swapped ports at each end.
Also, like Jaroslaw said, make sure that your ssh server permits
tunnelling.
If it is not permitted, you won't get any messages to that effect when
you
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)
> Hello,
>
> 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
I
> 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:
> http://www.realvnc.com/mailman/listinfo/vnc-list
_______________________________________________
VNC-List mailing list
VNC-List "at" realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list