Bug 1278 - CYGWIN controlMaster connections don't work. describes use of ControlMaster/ControlPersist as partially implemented under Cygwin as of December, 2016, but with a qualification that it works only for remote commands and not for connections that require a pseudo terminal.
While this answer was not confirmed under Cygwin, per se, it was validated as true for MSYS2 (based on Cygwin). openssh under MSYS2 supports ControlMaster/ControlPersist connections for remote commands, but not for interactive sessions.
$ cygcheck -V | head -3
cygcheck (msys) 3.0.7
System Checker for Msys
Copyright (C) 1998 - 2019 Cygwin Authors
$ ssh -V
OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
$ pacman -Qi openssh
Name : openssh
Version : 8.1p1-1
Description : Free version of the SSH connectivity tools
Architecture : i686
URL : https://www.openssh.com/portable.html
Licenses : custom:BSD
Groups : net-utils
Provides : None
Depends On : heimdal libedit libcrypt openssl
Optional Deps : None
Required By : sshpass
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 4.55 MiB
Packager : Alexey Pavlov <[email protected]>
Build Date : Mon, Oct 14, 2019 1:12:28 AM
Install Date : Thu, Oct 24, 2019 8:38:48 PM
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
The following errors occur when running ssh
without a remote command specified:
mm_send_fd: sendmsg(2): Broken pipe
mux_client_request_session: send fds failed
With remote commands specified, the errors do not occur.
ControlPath /tmp/...
probably sets you up for an attack where somebody else writes your predictable file name to /tmp first. Use relative pathControlPath %r@%h:%p
instead, this will put it in your~/.ssh
.