Bug 3378 - Make "Shared connectio to <host> closed." message silenceable, while Not silencing ALL messages
Summary: Make "Shared connectio to <host> closed." message silenceable, while Not sile...
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 8.8p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_9
  Show dependency treegraph
 
Reported: 2022-01-10 07:49 AEDT by Wayne Walker
Modified: 2022-02-25 13:56 AEDT (History)
1 user (show)

See Also:


Attachments
Change "Shared connection ..closed" message from "always" to VERBOSE (404 bytes, patch)
2022-01-10 07:49 AEDT, Wayne Walker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Walker 2022-01-10 07:49:15 AEDT
Created attachment 3563 [details]
Change "Shared connection ..closed" message from "always" to VERBOSE

The message "Shared connectio to <host> closed." cannot be silenced without silencing ALL messages from ssh.

Please change it to be of LogLevel INFO, or VERBOSE, or add a config option to silence it (e.g. MuxMessages default yes).

```
$ ssh -t daplane ls > /dev/null
Shared connection to 172.16.16.1 closed.
$
```

I understand that there are workarounds (e.g.,don't use -t, but sometimes the remote tool needs a tty); however, one should be able to silence the message (e.g., change LogLevel to ERROR) without silencing ERROR and FATAL messages.

Attached is a simple patch that should suffice.
Comment 1 Damien Miller 2022-01-10 16:39:35 AEDT
It is silenceable though. "ssh -q" or setting LogLevel=quiet stops it
Comment 2 Wayne Walker 2022-01-11 02:24:48 AEDT
@djm  Yes, -q or LogLevel=QUIET silences it, but that also silences even FATAL and ERROR messages.  If it we set to an actual LogLevel, then one could set LogLevel to ERROR and silence it while still receiving ERROR and FATAL messages, should they occur.
Comment 3 Damien Miller 2022-01-11 12:29:28 AEDT
This has been committed and will be in OpenSSH 8.9

commit 1385513b95a12b38e8270ddf34c2d5dc4aeb806b (HEAD -> master)
Author: djm@openbsd.org <djm@openbsd.org>
Date:   Tue Jan 11 01:26:47 2022 +0000

    upstream: suppress "Connection to xxx closed" messages at LogLevel >=
    
    error bz3378; ok dtucker@
Comment 4 Damien Miller 2022-02-25 13:56:42 AEDT
closing bugs resolved before openssh-8.9