LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-04-2008, 11:35 AM   #1
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Rep: Reputation: 15
Question Enable connection timed out option in ssh


I want know how to enable the connection timed out options in ssh.
For example I want disconnect the users, whose are logged my sever by using ssh and the connections are idle more than 10 Minutes.

How we can do this? Pls any one help me.......?
 
Old 10-04-2008, 12:28 PM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Rep: Reputation: 58
Try ClientAliveCountMax and ClientAliveInterval. This settings you can check out in "man sshd_config" they are explain there and how to set them. I have set ClientAliveCountMax to 60, but you can do it as its best for you.

Cheers!
 
Old 10-05-2008, 01:44 PM   #3
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,017
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
Or you could do it for all logins (not just ssh) by adding it to the system profile for the specific shell.

e.g. TMOUT=600 in /etc/bashrc for bash, or in /etc/profile for sh, and ksh. There is a similar timeout available for csh in /etc/login.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 07:28 AM
SSH Connection timed out davhak Linux - Networking 13 03-18-2007 03:41 AM
SuseFirewall2 and external SSH access connection timed out usmanaziz Linux - Distributions 1 09-03-2004 03:15 AM
ssh: Connection timed out. [from school] nixel Linux - Networking 2 05-19-2004 12:21 PM


All times are GMT -5. The time now is 11:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration