0

I have set up an automatic logout for idle ssh session using "ClientAliveInterval 7200"

However I do not get logged out everyone else who uses the server gets logged fine.

I have tracked the trouble maker down to this line in my personal .screenrc

caption always "%{WB}%H %{kG}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{kG}%?%+Lw%? %88=%{YR}%M%d %94=%{RY}%c%="

Does anyone know why this would stop the logout from working?

Is there a better automatic logout setting I can use that cannot be overridden?

I am using FreeBSD 8.0

2 Answers 2

0

ClientAliveInterval does not logout idle connections. It checks if the client is still connected at all (like a TCPKeepAlive, but encrypted). If the client responds to these requests (default for Putty, not for most *nix ssh) then the connection will stay open indefinitely.

If you want idle users logged out you need to do that through the shell. For Bash, Ksh, & Zsh add export TMOUT=7200 to the rc file.

3
  • but if I use TMOUT and have say 3 screens open it logs out the first screen after 7200 seconds then the second screen after another 7200 second and so on until it finally logs all the screens out. which is not really what I am going for. Jul 16, 2010 at 13:48
  • There's no way in SSH to kill the connection when it's idle while the client is responding to those keepalives. If you disable keepalives in the SSH client, you'll get booted after the 7200; but if anyone re-enables them it wont work anymore.
    – Chris S
    Jul 16, 2010 at 14:11
  • OK thanks for the help. That is what I was dreading the answer to be. Jul 19, 2010 at 16:35
0

So I am guessing no one has had this issue before I cannot find any reason for this and I cannot find a way around this issue with some other automatic logout option. bash's TMOUT does not work as it logs each screen out one at a time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .