13 Haziran 2020 Cumartesi

Prevent idle SSH timeouts: client_loop: send disconnect: Broken pipe

If there is no package transfer happens during SSH sesison,  sshd automatically closes that session. On Ubuntu, in order to prevent that;

Open sshd_config using vim:

vim /etc/ssh/sshd_config

Add lines:

ClientAliveInterval 60
ClientAliveCountMax 720

And then apply changes by restarting sshd;

sudo /etc/init.d/ssh restart
---
ClientAliveInterval configures the server to send null packets to clients every 60 seconds and ClientAliveCountMax configures the server to close the connection if the client has been inactive for 720 intervals that are 60*720 = 43200 which equals 12 hours.
Related Posts Plugin for WordPress, Blogger...