Last active
August 29, 2015 14:08
-
-
Save kireal/5fe297429af9cf5bc682 to your computer and use it in GitHub Desktop.
Set sshd alive interval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Server side | |
echo "ClientAliveInterval 60" | sudo tee -a /etc/ssh/sshd_config | |
# Ubuntu | |
service ssh restart | |
# CentOS | |
service sshd restart | |
#Client side | |
echo "ServerAliveInterval 60" >> ~/.ssh/config | |
echo "ServerAliveCountMax = 120" >> ~/.ssh/config | |
# Putty configuration: add send null packages every 5 seconds, connection settings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's fixes bug with Digitalocean very often "Broken pipe:..." messages and connection lost.