Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have requirement where I want my ssh seesion to target will logout after one hour,but currently leaving an ssh session to target board idle does not get auto logout after one hour.

Below is what is set in tagets sshd_config file

ClientAliveInterval 15

ClientAliveCountMax 4

So what changes I need to do so that my ssh session gets logged out after hour if it remains idle.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I already encountered situations where ClientAliveCountMax prevents the connection to be disconnected. I would advise the following settings:

# ClientAliveInterval is in seconds
ClientAliveInterval 3600
ClientAliveCountMax 0

This will close the connection after 1 hour if idle.

share|improve this answer
Thanks @Spack will give it a try. –  AMIT Oct 8 '13 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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