From owner-freebsd-questions@FreeBSD.ORG Fri Feb 17 18:35:06 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7059A16A424 for ; Fri, 17 Feb 2006 18:35:06 +0000 (GMT) (envelope-from micahjon@ywave.com) Received: from relay1.av-mx.com (relay1.av-mx.com [137.118.16.126]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE89D43D48 for ; Fri, 17 Feb 2006 18:35:05 +0000 (GMT) (envelope-from micahjon@ywave.com) X-Virus-Scan-Time: 0 Received: from [137.118.16.61] (HELO mx0.av-mx.com) by relay1.av-mx.com (CommuniGate Pro SMTP 4.2.10) with SMTP id 174440652 for freebsd-questions@freebsd.org; Fri, 17 Feb 2006 13:35:04 -0500 Received: (qmail 18650 invoked from network); 17 Feb 2006 18:35:04 -0000 Received: from dsl13176.ywave.com (HELO ?192.168.1.65?) (micahjon@ywave.com@66.243.212.176) by 0 with SMTP; 17 Feb 2006 18:35:04 -0000 X-CLIENT-IP: 66.243.212.176 X-CLIENT-HOST: dsl13176.ywave.com Message-ID: <43F61756.4060005@ywave.com> Date: Fri, 17 Feb 2006 10:35:02 -0800 From: Micah User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: scott@sremick.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: VNC forwarding over sshd issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 18:35:06 -0000 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 RealVNC. 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. HTH, Micah