Discussion:
ssh dying when network goes down briefly
(too old to reply)
William Unruh
2024-09-14 03:19:43 UTC
Permalink
I connect to my home machine using ssh. Unfotunately the network is
flakey. Whenever the network goes down even briefly, the ssh connection
dies (ie it delivers no more infomationfrom my machine to home or vice
versa). Since this seems to happen about every few minutes, it makes
the connection really hard to use. Is there some way of telling ssh not
to drop the connection when the network goes down, but to just
reestablish it when it comes back up and contiues the connection?
William Unruh
2024-09-28 20:20:38 UTC
Permalink
Post by William Unruh
I connect to my home machine using ssh. Unfotunately the network is
flakey. Whenever the network goes down even briefly, the ssh connection
dies (ie it delivers no more infomationfrom my machine to home or vice
versa). Since this seems to happen about every few minutes, it makes
the connection really hard to use. Is there some way of telling ssh not
to drop the connection when the network goes down, but to just
reestablish it when it comes back up and contiues the connection?
More information. My home machine is a Mageia 9 desktop running openssh.
This problem also occurs with my work desktop. The laptop is a Magein 9
(Dell xps13) machine as well. If I leave a connection open without any
traffice for a while ( minutes not hours) the connection will freeze. If
I open another terminal, and use ping say, my laptop is still connected to my
home machines. But that terminal is for the previous connection is
frozen. (nothing happens if I tryto type to it).

I have no idea how to debug this extremely annoying behavior.
Markus Robert Kessler
2024-10-10 08:57:55 UTC
Permalink
Post by William Unruh
Post by William Unruh
I connect to my home machine using ssh. Unfotunately the network is
flakey. Whenever the network goes down even briefly, the ssh connection
dies (ie it delivers no more infomationfrom my machine to home or vice
versa). Since this seems to happen about every few minutes, it makes
the connection really hard to use. Is there some way of telling ssh not
to drop the connection when the network goes down, but to just
reestablish it when it comes back up and contiues the connection?
More information. My home machine is a Mageia 9 desktop running openssh.
This problem also occurs with my work desktop. The laptop is a Magein 9
(Dell xps13) machine as well. If I leave a connection open without any
traffice for a while ( minutes not hours) the connection will freeze. If
I open another terminal, and use ping say, my laptop is still connected
to my home machines. But that terminal is for the previous connection is
frozen. (nothing happens if I tryto type to it).
I have no idea how to debug this extremely annoying behavior.
Hi,

ssh deamon will drop the connection when ssh client stops sending data for
some time. So, either sshd has to be modified (and recompiled, re-
packaged, re-installed, hence there may be side effects),
or at client side the connection has to be re-established.

Have you tried autossh already?

https://www.harding.motd.ca/autossh/

Looks promising, and can be found in the mga repository also.

Best regards,

Markus

Loading...