delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/01/17/11:52:49

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3EE93858D3C
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=pdinc.us
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pdinc.us
DKIM-Filter: OpenDKIM Filter v2.11.0 mail2.pdinc.us 20HGq8bw006354
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pdinc.us; s=default;
t=1642438328; bh=HupcsMAAKtNlkdnalcFYaSifbXEwHWxneOFEevBHEU0=;
h=From:To:References:In-Reply-To:Subject:Date:From;
b=IbOO5TTjsA2/eBav9uVnmi2FY5nnzl0do7WAJ/DX5+/jxOcbGDydRKDK72B8ZgZUt
LXbTsKLjD3Hzu1hVbS1He6jz32/5zCiUmoJj6IclBRsoNBY6bADvRTWOsw7i77wXsd
ajENA5YKSNBgQbbpuemQWfz9jTDfDKpltizi5vjAHgF3IYLRElDuyS0ArKC6wySkue
FlxkDViatP8DfKDHidzHyIaS0Vu689dmpGedBTkoNxweFhwphQmJWyaIdX6imqLsve
G4twETwKHo5NdFkOmI6BS7sPGw1Vr7OKVg43EdHYVIzXjin+u/SLCnQenUaUSxmR1P
1jafXC35JPiPg==
From: "Jason Pyeron" <jpyeron AT pdinc DOT us>
To: <cygwin AT cygwin DOT com>
References: <20220117162931 DOT jexrpvsyawnsdi7y AT lucy DOT dinwoodie DOT org>
In-Reply-To: <20220117162931.jexrpvsyawnsdi7y@lucy.dinwoodie.org>
Subject: RE: [cygwin] openssh connection sharing fails:
"mux_client_request_session: read from master failed: Connection reset by
peer"
Date: Mon, 17 Jan 2022 11:52:01 -0500
Organization: PD Inc
Message-ID: <032801d80bc2$8c6f3950$a54dabf0$@pdinc.us>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQE+1G87d6ob8FEcUICA5ltkrxtOEq2Z2vAg
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_20, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_INFOUSMEBIZ, SPF_HELO_PASS,
SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

> -----Original Message-----
> From: Adam Dinwoodie
> Sent: Monday, January 17, 2022 11:30 AM
> 
> The SSH connection sharing function in Cygwin's openssh release, using
> `ssh -M` or the ssh_config.5 ControlMaster configuration, doesn't appear
> to work.  Setting up a master connection seems fine, but subsequent SSH

Sadly, it is a known issue.

https://stackoverflow.com/questions/20959792/is-ssh-controlmaster-with-cygwin-on-windows-actually-possible/21439862#21439862

We would be happy to thrown some $ or beer at it.

> sessions that should reuse master connection instead set up their own
> session, with an error stating "mux_client_request_session: read from
> master failed: Connection reset by peer".
> 
> Simple testcase attached, which creates a master connection, starts a
> long sleep in a second SSH session, then terminates the master
> connection.  When I run this on one of my Debian boxes, the script takes
> about 6s to run, as tearing down the master connection terminates the
> long-running command.  When run from Cygwin, however, the script takes
> about 64s, as the second SSH session creates an independent connection
> that's unaffected by the master connection terminating.
> 
> On Debian:
> 
> ```
> $ time bash test.sh adam AT 192 DOT 168 DOT 1 DOT 131
> Master running (pid=7008)
> 
> Exit request sent.
> 
> real    0m6.048s
> user    0m0.083s
> sys     0m0.111s
> ```
> 
> On Cygwin:
> 
> ```
> $ time bash test.sh adam AT 192 DOT 168 DOT 1 DOT 131
> Master running (pid=5079)
> mux_client_request_session: read from master failed: Connection reset by peer
> 
> Exit request sent.
> finishing
> 
> real    1m4.071s
> user    0m0.106s
> sys     0m0.540s
> ```
> 
> Slightly redacted `cygcheck -srv` output also attached.
> 
> Adam


--
Jason Pyeron  | Architect
PD Inc        | Certified SBA 8(a)
10 w 24th St  | Certified SBA HUBZone
Baltimore, MD | CAGE Code: 1WVR6
 
.mil: jason DOT j DOT pyeron DOT ctr AT mail DOT mil
.com: jpyeron AT pdinc DOT us
tel : 202-741-9397




-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019