On one of our Mac OS X servers, we have set the following in /etc/ssh_config
:
# Keep idle connections alive for 10 minutes
Host *
ServerAliveInterval 600
Two questions:
1) Is this a good way to define a timeout limit for idle connections? http://www.ibm.com/developerworks/aix/library/au-sshsecurity/ suggests ClientAliveInterval
instead; but https://unix.stackexchange.com/questions/3026/what-do-the-options-serveraliveinterval-and-clientaliveinterval-in-sshd-conf seems to say that the two ways essentially yield the same result.
2) Does script execution time cut into the idle logout time? E.g., if someone runs a Perl script on the server, and the script takes 5 minutes, will the connection be suspended 5 minutes after the script ends? Put another way: What exactly does it mean for a ssh connection to be idle?