[Discuss] Questions about shells: Tmux, Screen, SSH and Terminator

Freddy Martinez freddymartinez9 at gmail.com
Sun Dec 21 22:13:48 UTC 2014


I think Kevin's solution[0] is the simplest and requires the least
amount of modification to workflow (sorry nixternal).

I have added the following lines to my ~/.ssh/config (you can of
course but this in /etc/ssh/sshd_config but I only care about my user
on the local server:

Host *
 ServerAliveInterval 180
 ServerAliveCountMax 2

I think this might have almost the same effect that Vytenis is
describing. I'll test this out for a week or so and report back.

Thanks everyone!
Freddy

[0] http://blog.hwarf.com/2009/06/howto-set-sshd-idle-timeout.html

On Sun, Dec 21, 2014 at 4:08 PM, vytenis silgalis <vsilgalis at gmail.com> wrote:
> If the problem is strictly related to timeouts there are 2 settings you
> should care about:
>
> ClientAliveInterval and ClientAliveCountMax
>
> My quick 30 second rundown:
> ClientAliveInterval - how often the server sends a message to the client to
> ensure the session doesn't timeout
> ClientAliveCountMax - number of times it sends a message before it decides
> that the client is a lazy bastard and times out the session
>
> My settings (60 seconds and 4 hours):
> ClientAliveInterval 60
> ClientAliveCountMax 240
>
> These are set in the sshd config on the server side, there are a couple of
> client side things you can do too, i like this because it doesn't require
> any of our engineers to set anything up on their side.  We use this because
> we route some of our SSH connections through a network gateway that a 5
> minute session timeout on anything that routes through it.




More information about the discuss mailing list