
Hi everyone Facing recurring ssh connection interruptions with long running processes, my go-to solution is to use "screen" on the remote server. But that doesn't get around the problem of my ssh sessions being defunct or closed ("broken pipe"). Doing a quick internet search, I've just come across "eternal terminal": "Eternal Terminal (ET) is a remote shell that automatically reconnects without interrupting the session. " https://eternalterminal.dev/ https://github.com/MisterTea/EternalTerminal Does anybody have any experience with it? Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 (office) +64 (7) 577-5304 (home office) https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

On Wed, 13 Jul 2022 13:43:44 +1200, Peter Reutemann wrote:
But that doesn't get around the problem of my ssh sessions being defunct or closed ("broken pipe").
Is this because of a NAT entry in your home router timing out from being idle? You can prevent this by configuring SSH are-you-there messages from either or both ends. See the ServerAliveInterval and ServerAliveCountMax options in ssh_config(5), or ClientAliveInterval and ClientAliveCountMax in sshd_config(5). Both ends also have TCPKeepAlive, but note that is sent unencrypted. These options are supposed to be for detecting broken connections, but they will also reset router idle timers.

But that doesn't get around the problem of my ssh sessions being defunct or closed ("broken pipe").
Is this because of a NAT entry in your home router timing out from being idle?
Hard to tell. There seem to be also network problems at the other end (corporate network), where ssh connections on that network get closed as well.
You can prevent this by configuring SSH are-you-there messages from either or both ends.
I only have control over these parameters at my end.
See the ServerAliveInterval and ServerAliveCountMax options in ssh_config(5), or ClientAliveInterval and ClientAliveCountMax in sshd_config(5). Both ends also have TCPKeepAlive, but note that is sent unencrypted.
These options are supposed to be for detecting broken connections, but they will also reset router idle timers.
Will see whether these options alleviate the problem. Thanks! Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 (office) +64 (7) 577-5304 (home office) https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

I only have control over these parameters at my end.
See the ServerAliveInterval and ServerAliveCountMax options in ssh_config(5), or ClientAliveInterval and ClientAliveCountMax in sshd_config(5). Both ends also have TCPKeepAlive, but note that is sent unencrypted.
These options are supposed to be for detecting broken connections, but they will also reset router idle timers.
Will see whether these options alleviate the problem. Thanks!
Just setting the options at the client end was not enough, I also had to update these settings on my jump host. Currently, I'm using: ServerAliveCountMax 100 ServerAliveInterval 15 The last couple of days, the ssh connections have been stable. Thanks again! Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 (office) +64 (7) 577-5304 (home office) https://www.cs.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/
participants (2)
-
Lawrence D'Oliveiro
-
Peter Reutemann