X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E85903861010
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1708232063;
	bh=YodCmiQVXEEYDpos2uS7mdlAeH4WPWgA7Wl43Q4fbVc=;
	h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=wYl7iEk7cPzE5Wkcxs3Qox2jB0d70E3GEFVCwKBHq4zlfhFf0rfZaK52LiAROytEx
	 OTiz+IisO65GYGgj5a1rxcpAfmzCfNKBB+nXs2m8Z86h/Axp7wD/eJq1smX8zsxm4a
	 rQDzB4FbnlWCtoHo1fnNicQUU4+lnhZvcotnn52g=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08234385B509
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 08234385B509
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708232015; cv=none;
 b=WWP/NSQEJ3rg88iVwd7DrLpMDxOVnAhJp7eXsapjFnHypoWbxFroUVZY38gf3+R2Q9MB7lIg1y4SGoBacFLecP1/X3uy/zi/ij1fljihD0K4dEZmatDICy5JNmX0/+R+IOj3JLO704WqKVleW7ObayYCA/FZVtTS6I0TGTj3iyw=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1708232015; c=relaxed/simple;
 bh=yJnER11wgXXUQhBvh/bZ4pd7/jXUVfjSyjDtCU6toCY=;
 h=DKIM-Signature:MIME-Version:Message-ID:Date:To:Subject:From;
 b=UgmtmhBpT8aEPQpfu9Cc8GbYT72mUeXdOhq4e9PD2cWkSGFnPDB3j1d9un0OcEh9xtsEGN8EAkTbCYyZvpQkO/em7qd6zP014G8Ipm+MKR3EEV481TdWRTOEKdTO9yBtSWgDYpFwEaJAETc5iVRyp8jgacUWQ/fx16kvSMYLV+w=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,
 RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Level: 
X-Spam-Score: -1.3
MIME-Version: 1.0
Message-ID: <0100018dba8ff244-68665f9e-01da-4b89-8d1e-87cb106513f7-000000@email.amazonses.com>
Date: Sun, 18 Feb 2024 04:53:32 +0000
To: cygwin@cygwin.com, Andrew Schulman <andrex.e.schulman@gmail.com>
Subject: Re: ssh over stunnel hangs on second connection
In-Reply-To: <gd32tih7i9qptkoli88f9blan4tmdfetff@4ax.com>
References: <0100018dae3b46a4-ccc76b81-1814-421b-a81c-d00436297c10-000000@email.amazonses.com>
 <2orusip0fcft7bvfemu05eb61l43vsnmj8@4ax.com>
 <0100018db4504c0a-a8320068-b704-4458-b4b1-eee8b912bdc7-000000@email.amazonses.com>
 <gd32tih7i9qptkoli88f9blan4tmdfetff@4ax.com>
X-Mailer: VM 8.2.0b under 25.2.2 (x86_64-pc-linux-gnu)
X-Virus-Scanned: ClamAV using ClamSMTP
Feedback-ID: 1.us-east-1.Zao4ZYFkcQIqFUKHPFqcIUzSz0SUuTXbgFyfdyEho8U=:AmazonSES
X-SES-Outgoing: 2024.02.18-54.240.8.97
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: cygwin--- via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@kosowsky.org
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

Andrew Schulman via Cygwin wrote at about 14:55:58 -0500 on Saturday, February 17, 2024:
 > >  > 
 > >  > But supposing you keep your current configuration. Can you please clarify how
 > >  > you're invoking stunnel? Do you have a ProxyCommand directive in your
 > >  > .ssh/config, like:
 > >  > 
 > >  > ProxyCommand /usr/bin/stunnel stunnel.conf
 > > 
 > > No... I just ssh to 'localhost' on the port that per stunnel.conf is
 > > listening for client connections.
 > > This works fine in Ubuntu and has worked fine for me before on
 > > Win7/Win10.
 > > 
 > > I don't use any fixed ProxyCommand to invoke stunnel because the vast
 > > majority of the time I just use straight SSH -- I only use 'stunnel'
 > > when SSH is blocked.
 > 
 > OK. So why that worked before and it doesn't work now, I don't know. But what
 > that sounds like to me is that you have only one stunnel process. When you
 > reproduce the problem, how many stunnel processes are running?
 > 
 > ps | grep stunnel
 > 
I have only one 'stunnel' process.
But remember that:
1. On Cygwin, so long as I don't 'exit' ssh, I can have multiple 'ssh'
   processes connect successfully over a single 'stunnel' process

2. Similarly, on Ubuntu, I can have multiple 'ssh' logins (and
   logouts) over a single 'stunnel' process

So again it seems like something happens to the 'stunnel' process when
I exit 'ssh' on Cygwin.

> The advantage of using ProxyCommand in your ssh config is that it starts a
 > separate stunnel process for each connection, which should avoid this problem.
 > 
 > If you don't usually need stunnel, you can create one two ssh configurations
 > with different names, one with ProxyCommand and one without, and use whichever
 > one you need.
 > 
Definitely a possible solution though I would like to forget why it
 isn't working normally on Cygwin.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
