9

I'm working remotely on a new CentOS 7 VM. I have screen running with several open sessions. I'm finding that if I leave one of the sessions idle for awhile, then try to come back to it, it's gone. Nothing special going on in the sessions - ssh connections to other systems, mysqlclient, top, etc. - those all stay up. But if I just leave a session sitting at the bash shell prompt, it disappears - I just watched one and it took about 10-11 minutes.

I've never had that happen before. Any idea what's going on?

New information. It's probably not screen. I opened a new ssh session to this system and left it idle. And it closed on me as well. But this time I got a message:

timed out waiting for input: auto-logout

Off to google... probably some goofy shell setting?

  • When you say it "disappeared", was it that the screen session ended, or was it that a GUI window containing the screen session closed on you leaving the session still running but no longer connected and visible? – roaima Jan 27 '17 at 21:51
  • "disappeared" as in if I flip through the screen sessions (ctrl-a n, ctrl-a p) the session is no longer there. Screen is still running. There were 4 sessions, as counted with ctrl-a ". Come back 10 minutes later and the 3 sessions with something going on are still there, and the idle bash session is just gone. – CoAstroGeek Jan 27 '17 at 21:57
  • 3
    Is the bash variable TMOUT set to a positive integer? That's the number of seconds before an idle shell will close. – roaima Jan 27 '17 at 21:59
  • That's it exactly - our friendly neighborhood sysadmins saw fit to set it in /etc/profile.d/os-security.sh It's all better now - thanks :) – CoAstroGeek Jan 27 '17 at 22:09
8

A bash shell can be configured to exit after a certain amount of idle time. This value is defined with the TMOUT variable.

For example, TMOUT=300 will cause the shell to exit after 5 minutes (300 seconds) of inactivity.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.