The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Set SSH timeout

Discussion in 'General Discussion' started by Wallaby, Jan 26, 2004.

  1. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    What is the recommended way of setting the timeout on SSH sessions? (running RedHat 9 with Cpanel of course).

    We want to be sure the system logs someone off automatically if their SSH connection has been idle for more than X minutes.

    Thanks!
     
  2. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    open /etc/profile
    at the end, add (this is custom to my needs, you'll need to modify the values to your own)

    TMOUT=180
    export TMOUT

    TMOUT is basically the timeout value. That's in seconds, so my sessions (the few clients that can login through ssh) are timed out after 3 minutes of idle time. Adjust that to fit.
     
  3. Wallaby

    Wallaby Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    18
    Cheers, I'll give that a try!
     
Loading...

Share This Page