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

vytenis silgalis vsilgalis at gmail.com
Sun Dec 21 22:08:11 UTC 2014


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.


On Sun, Dec 21, 2014 at 3:03 PM, Kevin Brandstatter <icarusthecow at gmail.com>
wrote:

>  http://blog.hwarf.com/2009/06/howto-set-sshd-idle-timeout.html
>
> Quick google search found that, which shows a parameter for the idle
> timeout on the remote side.
> From the man page for sshd_config
> """
> ClientAliveInterval
>              Sets a timeout interval in seconds after which if no data has
> been received
>              from the client, sshd(8) will send a message through the
> encrypted channel to
>              request a response from the client.  *The default is 0,
> indicating that these*
> *             messages will not be sent to the client*.  This option
> applies to protocol ver‐
>              sion 2 only.
> """
> I can only assume that means the server will do nothing to try and keep
> the connection open.
>
> -Kevin
>
> On 12/21/2014 02:59 PM, Freddy Martinez wrote:
>
> The local sshd or the remote server?
> On Dec 21, 2014 2:58 PM, "Kevin Brandstatter" <icarusthecow at gmail.com>
> wrote:
>
>> I use terminator + tmux as well, and i've never really had a problem
>> with ssh sessions other than the connections timing out
>> if it sits idle for a while, but i've had that issue in just about every
>> setup. Might try looking into if theres an idle timeout setting for sshd
>> or something
>>
>> -Kevin
>>
>> On 12/21/2014 02:49 PM, Freddy Martinez wrote:
>> > Hi folks,
>> >
>> > I've been having a lot of issues lately with my SSH sessions (I have
>> > to maintain ~5 for 8+ hours a day with frequency having to lock /
>> > leave my work station).  Here's my current setup. I use Terminator and
>> > have it split with 3-4 panes and just use SSH.  I don't use screen
>> > because I find that it doesn't work great with Terminator. Some of my
>> > coworkers use tmux (you can launch it inside terminator) but I dislike
>> > the keybindings. The advantage of tmux is that is supports screen-like
>> > behavior but its actively supported. (screen isn't maintained anymore
>> > AFAIK).
>> >
>> > What's your setup? Do anyone have a recommendation that isn't tmux?
>> > Ideally I'd like to use terminator + <something else>.
>> >
>> > Thanks,
>> > Freddy M
>> >
>> > _______________________________________________
>> > discuss mailing list
>> > discuss at lists.chicagolug.org
>> > http://lists.chicagolug.org/cgi-bin/mailman/listinfo/discuss
>>
>>
>> _______________________________________________
>> discuss mailing list
>> discuss at lists.chicagolug.org
>> http://lists.chicagolug.org/cgi-bin/mailman/listinfo/discuss
>>
>
>
> _______________________________________________
> discuss mailing list
> discuss at lists.chicagolug.org
> http://lists.chicagolug.org/cgi-bin/mailman/listinfo/discuss
>
>


-- 
Vytenis Silgalis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chicagolug.org/pipermail/discuss/attachments/20141221/ec381c02/attachment-0002.html>


More information about the discuss mailing list