Opty
2024-Jun-01 13:48 UTC
OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
On Sat, Jun 1, 2024 at 5:23?AM Damien Miller <djm at mindrot.org> wrote:> On Fri, 31 May 2024, Opty wrote: > > 9.7p1 built from source without TCP wrappers and still no 'Connection > > closed' at 'LogLevel INFO'. > > You might be hitting this exit path: > > diff --git a/serverloop.c b/serverloop.c > index 4eabfced6..bf45f77a2 100644 > --- a/serverloop.c > +++ b/serverloop.c > @@ -266,11 +266,11 @@ process_input(struct ssh *ssh, int connection_in) > if (errno == EAGAIN || errno == EINTR || errno == EWOULDBLOCK) > return 0; > if (errno == EPIPE) { > - verbose("Connection closed by %.100s port %d", > + logit("Connection closed by %.100s port %d", > ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); > return -1; > } > - verbose("Read error from remote host %s port %d: %s", > + logit("Read error from remote host %s port %d: %s", > ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), > strerror(errno)); > cleanup_exit(255);Indeed I am. What now? Should PuTTY change its 'perfectly OK to unceremoniously slam the connection shut when you're done' attitude? Regards, Opty
Damien Miller
2024-Jun-05 04:03 UTC
OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
On Sat, 1 Jun 2024, Opty wrote:> Indeed I am. > > What now?We need to decide whether to promote these log messages to INFO.> Should PuTTY change its 'perfectly OK to unceremoniously > slam the connection shut when you're done' attitude?I don't think they need to. I think it's fair that we log connections that are terminated regardsless of how graceful the termination was. E.g. why shouldn't we log connections that drop because the peer process got SIGINT or the TCP connection dropped before sending a SSH2_MSG_DISCONNECT? -d
Maybe Matching Threads
- OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
- OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
- OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
- OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT
- OpenSSH server doesn't log client disconnect without SSH_MSG_DISCONNECT