If it's just SSH, you need ClientAliveInterval 600 for 10 minute time out.
Main Topics
Browse All TopicsIs there any way by which ssh server disconnect after 10 min if the user is not using the remote terminal.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
At the bottom of the page above it says:
Dealing with ssh clients
SSH allows administrators to set an idle timeout interval. After this interval has passed, the idle user will be automatically logged out. Open /etc/ssh/sshd config file, enter:
# vi /etc/ssh/sshd config
Find ClientAliveInterval and set to 300 (5 minutes) as follows:
ClientAliveInterval 300
ClientAliveCountMax 0
Save and close the file. Restart sshd:
# service sshd restart
Pretty much, yeah. ClientAliveCountMax is the maximum amount of times sshd will try contact the client (after the ClientAliveInterval time) to determine if it's up.
So pretty much, if you have ClientAliveInterval set to 10 (for ease of example here), every 10 seconds the server is going to check if the client is connected (responding to a sort of ping if you will). So if ClientAliveCountMax is 0, it'll try once after 10 seconds of idle time to check if client is still alive, if it's not, it'll disconnect the client. If ClientAliveMaxCount is 3, it'll try 3 times before disconnecting the client, so in this case 3x10 = 30 second of inactivity. There's more info in 'man sshd'.
I don't think I've ever changed the default of ClientAliveCountMax, I've always changed it at 0 (default is 3) and altered the ClientAliveInterval as to me it's pretty much the same thing.. maybe someone else would have an explanation as to why ClientAliveCountMax exists when you can just alter ClientAliveInterval.
As for custom error message, I think the error is just a connection timed out and cannot be altered.
Business Accounts
Answer for Membership
by: stephenhoekstraPosted on 2009-11-05 at 02:14:50ID: 25748040
Hello,
aq/linux-u nix-login- bash-shell - force-tim e-outs/ covers what you would like to acheive.
Easy step by step at http://www.cyberciti.biz/f