Skip to content

Instantly share code, notes, and snippets.

@kireal
Last active August 29, 2015 14:08
Show Gist options
  • Save kireal/5fe297429af9cf5bc682 to your computer and use it in GitHub Desktop.
Save kireal/5fe297429af9cf5bc682 to your computer and use it in GitHub Desktop.
Set sshd alive interval
#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
@kireal
Copy link
Author

kireal commented Nov 8, 2014

It's fixes bug with Digitalocean very often "Broken pipe:..." messages and connection lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment