Hello.
I'm running a Parallels Plesk 11 installation with CentOS release 5.8 (Final). When I'm logged in via SSH, after 5 minutes of inactivity, the session times-out (broken pipe). I've search everywhere and have no clue where the length of time is being set before the SSH session is terminated. Looking at the regular culprits in sshd_config, all of the following are commented out:
TCPKeepAlive
ClientAliveInterval
ClientAliveCountMax
So, it's not sshd_config setting the 5-minute timeout duration before SSH is killed. None-the-less, I was hoping to extend this, server-wide, to 10 minutes. So, I've uncommented the following and set them as follows:
TCPKeepAlive Yes
ClientAliveInterval 60
ClientAliveCountMax 10
From my understanding of ClientAliveInterval and ClientAliveCountMax, this *should* keep an SSH session alive for 10 minutes (without activity). But, that doesn't seem to be the case? While setting the above has INCREASED the timeout duration beyond 5 minutes, I'm now unsure how long it'll be kept alive? I've had an inactive SSH session alive for almost 25 minutes now. And again, based on my understanding of ClientAliveInterval and ClientAliveCountMax, via the man page, the session should timeout after 10 minutes (based on my settings).
Am I incorrect in my understanding of how this should work?
Thanks,
Kristin.
Extending SSH timeout (server side solution)?
Re: Extending SSH timeout (server side solution)?
My usual solution for this is client side - in $HOME/.ssh/config add [b]ServerAliveInterval 300[/b] though putty etc have a similar setting in their set up pages.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Extending SSH timeout (server side solution)?
man sshd_config
ClientAliveCountMax is used to close dead connections after the specified number of keepalive messages are not acknowledged.
ClientAliveCountMax is used to close dead connections after the specified number of keepalive messages are not acknowledged.
Re: Extending SSH timeout (server side solution)?
I am afraid to be too late for this question. But, I want to write my comment.
I had also this problem.
Combination of ClientAliveCountMax and ClientAliveInterval did not work as I expected. I suspect that the action of these parameters is not the one which we want to do.
Maybe, these parameters act on something internal operation of ssh, but not on user's operation. For this purpose, it's better to handle terminal session, but not to handle sshd.
For example, for bash, edit /etc/bashrc
TMOUT = 400
readonly TMOUT
export TMOUT
I had also this problem.
Combination of ClientAliveCountMax and ClientAliveInterval did not work as I expected. I suspect that the action of these parameters is not the one which we want to do.
Maybe, these parameters act on something internal operation of ssh, but not on user's operation. For this purpose, it's better to handle terminal session, but not to handle sshd.
For example, for bash, edit /etc/bashrc
TMOUT = 400
readonly TMOUT
export TMOUT