public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Jason Pyeron" <jpyeron@pdinc.us>
To: <cygwin@cygwin.com>
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	[thread overview]
Message-ID: <032801d80bc2$8c6f3950$a54dabf0$@pdinc.us> (raw)
In-Reply-To: <20220117162931.jexrpvsyawnsdi7y@lucy.dinwoodie.org>

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




  reply	other threads:[~2022-01-17 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 16:29 Adam Dinwoodie
2022-01-17 16:52 ` Jason Pyeron [this message]
2022-01-17 16:59   ` [cygwin] " Jason Pyeron
2022-01-17 20:36   ` Adam Dinwoodie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='032801d80bc2$8c6f3950$a54dabf0$@pdinc.us' \
    --to=jpyeron@pdinc.us \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).