[Bug 2573] dead sessions cannot be closed with ~.

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed May 31 06:56:58 AEST 2023


https://bugzilla.mindrot.org/show_bug.cgi?id=2573

Christoph Anton Mitterer <calestyo at scientia.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CLOSED                      |REOPENED
         Resolution|FIXED                       |---

--- Comment #15 from Christoph Anton Mitterer <calestyo at scientia.org> ---
Hey.

I think I have to re-open this.

While I haven't seen the issue in *quite* a while it just happened to
me again, with both client and server having very recent versions of
OpenSSH:
OpenSSH_9.2p1 Debian-2, OpenSSL 3.0.8 7 Feb 2023


I had a connection open to a server at the university and then
suspended (s2idle) the laptop with the client.
After resuming (1h or so later) the connection was of course dead, but
when I tried to kill it (several times with <newline>~. nothing
happened.

Only when I killed the mux process the terminal that ran the client
returned:
root at lcg-lrz-admin:~# Shared connection to lcg-lrz-admin.grid.lrz.de
closed.
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ ~.
bash: ~.: command not found
calestyo at heisenberg:~$ ~.
bash: ~.: command not found
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ ~.
bash: ~.: command not found
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ ~.
bash: ~.: command not found
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$ 
calestyo at heisenberg:~$

As you can see, as previously it then entered everything that I've
entered supposedly for the remote side, locally instead (which can have
quite awful effects as described above in comment 9).


With that connection I was using control channel multiplexing,... so
maybe something is left there?

That's also how I killed the hanging client... I have a script that
simply kills all running mux processes like this:
#print the matching processes
pgrep --full --exact --euid "${LOGNAME}" --list-full -- "^ssh:
${HOME}/\.ssh/mux/.+ \[mux].*$"

#ask for confirmation
printf '\nPress return to kill these processes.\n'
read tmp

pkill --full --exact --euid "${LOGNAME}" -- "^ssh: ${HOME}/\.ssh/mux/.+
\[mux].*$"



But a) the ~. should ideally work nevertheless and b) the stuff should
then especially not be inserted on the local process.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list