2016-04-19 13:47:42 0 Comments Linux Boy.Lee

Fixed Centos SSH connection auto break

SSH is very important tools for server admin, but sometime the connection will auto break, so we have to re-connection and re-cd and blabla, it's not acceptable!!

After research, I found the follow change can help keep SSH connection for hours, everything back to normal and happy working again :)

 

1. found and open etc/ssh/sshd_config on server
2. set value ClientAliveInterval 60
3. ClientAliveCountMax 3
btw, the default value is 3 for ClientAliveCountMax, so keep #ClientAliveCountMax is fine.
4. restart ssh 
service sshd reload