nano /etc/ssh/sshd_config
# other configs above
ClientAliveInterval 600
TCPKeepAlive yes
ClientAliveCountMax 10Restart the ssh server so that changes take effect:
$ sudo /etc/init.d/ssh restart- linux : nano ~/.ssh/config
- window :edit C:\Users**USER**.ssh\config
Host *
ServerAliveInterval 20
TCPKeepAlive no