• ssh dying when network goes down briefly

    From William Unruh@2:250/1 to All on Saturday, September 14, 2024 04:19:43
    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?

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Saturday, September 28, 2024 21:20:38
    On 2024-09-14, William Unruh <unruh@invalid.ca> wrote:
    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.


    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Markus Robert Kessler@2:250/1 to All on Thursday, October 10, 2024 09:57:55
    On Sat, 28 Sep 2024 20:20:38 -0000 (UTC) William Unruh wrote:

    On 2024-09-14, William Unruh <unruh@invalid.ca> wrote:
    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

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)