Yuri
2023-Apr-07 16:13 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
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
Brian Candler
2023-Apr-07 16:32 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
Try setting Host * ? ServerAliveInterval 240 in .ssh/config on the client (wherever that is in Windows).? Or pass "-o ServerAliveInterval=240" on the ssh client command line. I've seen this where connections pass through some low grade external firewall, which drops state after a certain amount of inactivity without sending back RST (and apparently is immune to TCP keepalives too). You say both boxes are on the same LAN, but it's possible that a badly-configured software firewall on the FreeBSD box could be the cause - or on Windows itself.
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 22:38 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
The fact that '-o ServerAliveInterval=50' makes no difference suggests that there is a bug in the OpenSSH client. It either fails to sent heartbeats, or it gets stuck in some Windows system call and this makes it to fail to send heartbeats. Yuri
Nico Kadel-Garcia
2023-Apr-08 01:24 UTC
Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
The OpenSSH daemon is supposed to start, and fork off additional daemons for new connections, to prevent the loss of the main daemon from killing vital, long-running, active connections. Various tools have tried to mandate the end of client sessions, for various reasons and by various mens, Please don't try to "improve security" by breaking long-standing features. This feature, in particular, allows a remote administrator to revise the SSH configuration, restart it for validation, and not lose the existing remote shell session to allow reverting a risky chnage. Such changes would become *vastly* more risky, and very difficult to revert due to the now broken sshd configuration. Been there, done that. Last Tuesday..... On Fri, Apr 7, 2023 at 12:18?PM Yuri <yuri at rawbw.com> 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
Seemingly Similar Threads
- Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
- Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
- Established connection timing out
- Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die
- Killing the OpenSSH server doesn't cause the Windows OpenSSH client to die