Friday, December 14, 2012

Prevent ssh auto disconnect after some time

Prevent ssh auto disconnect after some time

On the server side:

nano /etc/ssh/sshd_config

Add or modify the lines:
ClientAliveInterval 30
ClientAliveCountMax 5

You will need to restart sshd:
/etc/init.d/ssh restart

On the client side:

nano /etc/ssh/ssh_config

Add or modify the lines:
ServerAliveInterval 30
ServerAliveCountMax 5


No comments:

Post a Comment