How do I logout the user from ssh after 15 minutes of inactivity?

Updated 2012-05-21T02:25:04+00:00

Issue

How do I logout the user from ssh after 15 minutes of inactivity?

Environment

Red Hat Enterprise Linux 4

Resolution

1.Configure the timeout value in the /etc/ssh/sshd_config under the following parameters:

#vi /etc/ssh/sshd_config
...
ClientAliveInterval 5m          # 5 minutes
ClientAliveCountMax 3           # 3 times

2.Restart the ssh service :

#service sshd restart

This would make the timeout session 15 minutes as the `ClientAliveCo...

Subscriber content preview. For full access to the Red Hat Knowledgebase, please log in.

Not a subscriber? Learn more about the benefits of Red Hat Subscriptions.