VNC forwarding over sshd issue
micahjon at ywave.com
Fri Feb 17 10:35:06 PST 2006
Scott I. Remick wrote:
> I'm having a weird problem that surfaces sometimes and I am having trouble
> pinning down the cause.
> What I do is use VNC to remote-control my home FreeBSD box remotely. Most
> of the time, this works fine. My home router forwards the external port to
> my FreeBSD (6.0R) box. I use PuTTY as a Windows ssh client, and have a
> saved session that does the VNC port-forwarding (local port 7000 forwards
> over ssh to remote port 5900). I run Gnome (2.12.2) and vino as my VNC
> server and connect to my home desktop. Sshd is OpenSSH 2.6.1, PuTTY 0.53b,
> TightVNC 1.2.9
> But every now and then (like right now), the VNC side of things fails. I
> can still connect via SSH just fine. The PuTTY logs show the port is
> successfully being forwarded with no error:
> 2006-02-17 09:38:58 Local port 7000 forwarding to localhost:5900
> But when I try to launch a VNC client on the remote PC (in this case,
> TightVNC) I get a "Connection closed" error. The PuTTY logs show:
> 2006-02-17 09:52:42 Opening forwarded connection to localhost:5900
> 2006-02-17 09:52:42 Forwarded port closed
> On the FreeBSD box, no log files seem to get changed after the attempt. In
> particular, I check messages and auth.log but doing a listing sorted by
> time, I see nothing logged.
> What I DO know is if I went home and restarted the FreeBSD box, it'd work.
> I've tried -HUP on both sshd and vino-server to no avail.
> I cannot find any docs for vino-server to determine additional params I
> could pass it for more-detailed logging. Enabling additional debugging info
> on sshd with the -d option seems to not be an option remotely since it
> prevents it from going into daemon mode and it'll only handle one
> connection, and I can't make the problem surface on-request in order to
> test it while at home.
> The problem is particularly annoying because I can't MAKE it happen. It
> just sometimes does, with no settings changes, and will work again after
> rebooting the FreeBSD system, again with no settings changes. SSH never
> stops working... it's always the VNC-port-forwarding side of things.
> Any suggestions? Somewhere else to look for info? Some way to get more
> debug info from sshd or vino-server? Thanks
I'm assuming you try to connect several times and it fails each time. I
use TightVNC to connect to KDE's desktop sharing and it gives the same
error sometimes (not through SSH though). If I keep trying it will
eventually get through.
Some basic troubleshooting ideas:
Eliminate SSH port forwarding as a suspect by connecting directly to the
VNC port from your LAN the next time the error comes up.
Eliminate TightVNC as a suspect by trying another VNC client, such as
Eliminate Vino as a suspect trying another VNC server.
A -HUP wont necessarily do anything to a daemon that is responding
oddly. You can try restarting sshd completely by doing /etc/rc.d/sshd
restart. This can be done remotely, just don't close your existing
connection until you know the daemon came back up. Close your connection
and reconnect. You can probably do the same to vino by killing it and
then bringing it back up (not familiar with vino).
Once you know where the problem originates maybe you can figure out how
to fix it, or at least how to work around it.
More information about the freebsd-questions