Score:0

openssh multiplex - master is running but ssh connections hangs

sy flag

So I have a server running openssh 8

[root@jnode-fw15 ~]# rpm -qa |grep -i openssh
openssh-clients-8.0p1-12.el8.x86_64
openssh-askpass-8.0p1-12.el8.x86_64
perl-Net-OpenSSH-0.80-1.el8.noarch
openssh-server-8.0p1-12.el8.x86_64
openssh-8.0p1-12.el8.x86_64

The server has an open multiplex session connected (ips replaced)

[root@jnode-fw15 ~]# ll /tmp/wk-d0307-node-a_23
srw------- 1 cyc cyc 0 Dec 26 19:40 /tmp/wk-d0307-node-a_23
[root@jnode-fw15 ~]# ps -ef |grep /tmp/wk-d0307-node-a_23 |grep mux
cyc      3748383       1  0 19:40 ?        00:00:00 ssh: /tmp/wk-d0307-node-a_23 [mux]
[root@jnode-fw15 ~]# lsof -i -nP |grep 3748383
ssh       3748383     cyc    3u  IPv4 130530051      0t0  TCP xx.xx.xx.xx:57556->xx.xx.xx.xx:23 (ESTABLISHED)

However, running a check to this master, the session just hangs:

[root@jnode-fw15 ~]# date; timeout 10 ssh -v -p 23 -o controlpath=/tmp/wk-d0307-node-a_23 check ls ; date
Mon Dec 26 20:28:51 IST 2022
OpenSSH_8.0p1, OpenSSL 1.1.1k  FIPS 25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
Mon Dec 26 20:29:01 IST 2022

Narrowing down the problem further, the master was created like this:

root@jnode-fw15~ $ ssh -p23 -o controlmaster=yes -o controlpath=/tmp/wk-d0307-node-a_23 -o controlpersist=1200 -o ConnectTimeout=10 -2 -o ServerAliveInterval=10 wk-d0307-node-a_23 echo

I believe that when we pass the controlpersist timeout, the master does not shut down after it times out, the problem is that it stops replying at all

It's even impossible to shut it down:

[root@jnode-fw15 ~]# ssh -v -O exit -o controlpath=/tmp/wk-d0307-node-a_23 wk-d0307-node-a_23
OpenSSH_8.0p1, OpenSSL 1.1.1k  FIPS 25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config

any ideas?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.