From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2.pdinc.us (mail2.pdinc.us [67.90.184.28]) by sourceware.org (Postfix) with ESMTPS id E3EE93858D3C for ; Mon, 17 Jan 2022 16:52:09 +0000 (GMT) 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 Received: from blackfat (nsa1.pdinc.us [67.90.184.2]) (authenticated bits=0) by mail2.pdinc.us (8.14.4/8.14.4) with ESMTP id 20HGq8bw006354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 17 Jan 2022 11:52:08 -0500 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" To: References: <20220117162931.jexrpvsyawnsdi7y@lucy.dinwoodie.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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQE+1G87d6ob8FEcUICA5ltkrxtOEq2Z2vAg Content-Language: en-us 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 16:52:12 -0000 > -----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@192.168.1.131 > Master running (pid=7008) > > Exit request sent. > > real 0m6.048s > user 0m0.083s > sys 0m0.111s > ``` > > On Cygwin: > > ``` > $ time bash test.sh adam@192.168.1.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.j.pyeron.ctr@mail.mil .com: jpyeron@pdinc.us tel : 202-741-9397