ssh session breaks when idle.

Hello.
Ssh session breaks when idle.
The inactivity ssh session lasts about 2 minutes.
What parameter did I forget to configure?
At break of ssh session here that is written.
client_loop: send disconnect: Broken pipe
Server.
Code:
FreeBSD 11.2-RELEASE-p13 amd64
OpenSSH_7.5p1, OpenSSL 1.0.2o-freebsd  27 Mar 2018

/etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 900
ClientAliveCountMax 30

Client.
Code:
Linux 4.9.192-gentoo x86_64
OpenSSH_8.0p1, OpenSSL 1.1.1d  10 Sep 2019

TCPKeepAlive yes
ClientAliveInterval 900
ClientAliveCountMax 50
 
Perhaps my internet provider is disconnecting.
Our ssh session is approximately idle for about 5 minutes.
 
While the solution to the problem is this.
The provider resets idle connections for approximately 4-5 minutes.
2 hours to keep an inactive ssh session.

serever /etc/ssh/sshd_config
Code:
ClientAliveInterval 240
ClientAliveCountMax 30

client
Code:
$ cat ~/.ssh/config
ServerAliveInterval 240
ServerAliveCountMax 30
 
Back
Top