Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Message-Id: From: schew@interzone.com (Steve Chew) Subject: SSH -R problem To: cygwin@cygwin.com Date: Tue, 9 Apr 2002 23:48:56 -0400 (EDT) Reply-To: schew@interzone.com (Steve Chew) X-Motto: Never give up! Content-Type: text Hello, I've found a problem when running OpenSSH under Cygwin on Win98. The problem occurs when using the "ssh -R" option to do port forwarding from a remote host to my local machine. The remote machine is a Linux box running OpenSSH sshd. Everything works OK at first but after enough sessions are made across the SSH tunnel, I can no longer open sockets and other network programs on the Cygwin system (such as IE) fail. If I create enough sessions the entire system can hang. By sessions, I mean the following: - I open a connection with telnet (or whatever) across the SSH tunnel - I then close the connection before opening a new connection. - So, there should be no open sockets after each session. One symptom of the problem is that after each session I end up with an extra socket in the LISTEN state on the Cygwin box (use netstat -an to check the socket states). I don't know why there would even be any sockets in the LISTEN state on the Cygwin box since the ssh client shouldn't have to do a listen. What ends up happening is that I keep accumulating extra sockets in the LISTEN state (one for each session). I believe that Cygwin + "ssh -R" are combining to use up all of the file descriptors on the system due to the extra sockets in the LISTEN state. I have installed the latest Cygwin binaries and it still happens. A similar problem happens on Windows 2000. But, it only happens on Win2k when there is no server listening for connections on the Cygwin box. This problem does *not* happen when using OpenSSH on Solaris. The results of a cygcheck are at this URL: http://www.interzone.com/Personal/cygwin.info I went ahead and got the source code for OpenSSH and put some debugging output into it to see if it was inadvertently doing a listen() but as far as I could tell it wasn't. Has anyone else seen this problem? I find the problem pretty debilitating since I want to run the tunnel to my local server for a long period of time and use a lot of connections but it ends up hanging the system. Any help would be appreciated. :) Steve schew@interzone.com P.S. Another issue that may be related is that when there is no server on the Cygwin box listening for connections across the SSH tunnel I would expect that a telnet across the tunnel would result in a Connection Refused message. This is what happens when using Solaris instead of Cygwin. Instead, the connection just hangs until it is killed. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/