Keep SSH Connections Alive

/etc/ssh/ssh_config



and add the following line to the end of the file:



ServerAliveInterval 60



Per user configuration



~/.ssh/config

If the file does not exist, this will create a new file.



Add the following line:



Host *

ServerAliveInterval 60

Comments