Bob Rasmussen
2023-Apr-07 17:08 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
It depends how you "kill" the SSH server. If you kill it by sending it a SIGKILL signal, it will NOT notify the client, so the client will stay running until the client discovers the connection is broken. What happens if you send the SSH server a SIGHUP signal? This should cause an orderly shutdown on the server, which should notify the client, which should cause the client to do an orderly shutdown. On Fri, 7 Apr 2023, Yuri wrote:> I connect with the OpenSSH client on Windows to the OpenSSH server on > FreeBSD, all in one LAN, Wifi to Eithernet. > > > After a while, usually when the connection is inactive for some time, it > becomes dysfunctional: it becomes impossible to connect through reverse port > forwards from FreeBSD to Windows. > > At such times killing the ssh server process on FreeBSD, corresponding to the > connection, doesn't cause the client to exit on Windows. > > But hitting Enter on the client in Windows causes it to immediately exit. > > > Did anybody experience a problem like this? > > Could there be a bug in OpenSSH? > > Is it possible that Windows fails to deliver the signal to the client that > the connection was terminated? > > > Thank you, > > Yuri > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev >Regards, ....Bob Rasmussen, President, Rasmussen Software, Inc. personal e-mail: ras at anzio.com company e-mail: rsi at anzio.com voice: (US) 503-624-0360 fax: no longer available web: http://www.anzio.com Mailing address: Rasmussen Software, Inc. NEW AS OF JULY 1, 2022 6265 SW Erickson Ave. Beaverton OR 97008 USA
Yuri
2023-Apr-07 17:13 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
Hi Rob, On 4/7/23 10:08, Bob Rasmussen wrote:> It depends how you "kill" the SSH server. > > If you kill it by sending it a SIGKILL signal, it will NOT notify the > client, so the client will stay running until the client discovers the > connection is broken.I run 'kill <pid>' which sends SIGTERM. This should shout it down gracefully. But even with SIGKILL the OS would still shut down the network connection gracefully, and this should be propagated to the client. Yuri