LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-19-2009, 11:32 PM   #1
lasygsd
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
SSH concurrent session limit and idle session time out


Hi All,

How do we limit the number of concurrent remote ssh session to 5 and session idle time out is 5 Minute

Thanks in advacne
 
Old 04-20-2009, 12:57 AM   #2
centralb
LQ Newbie
 
Registered: Jan 2007
Distribution: Redhat, Debian, "Custom"
Posts: 27

Rep: Reputation: 15
Assuming you're using OpenSSH, you can limit unauthenticated connections with the MaxStartups directive in sshd_config.

If your situation permits, also use "PermitRootLogin no" and specify the users able to use SSH with "AllowUsers user1 user2 usern..."


For Idle Timeout, use the ClientAliveInterval and ClientAliveCountMax directives.

For more details:

Code:
man sshd_config
Also, it's a good idea to search the forums first before posting questions. A lot of questions have already been asked and answered.
 
Old 04-21-2009, 10:11 PM   #3
lasygsd
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by centralb View Post
Assuming you're using OpenSSH, you can limit unauthenticated connections with the MaxStartups directive in sshd_config.

If your situation permits, also use "PermitRootLogin no" and specify the users able to use SSH with "AllowUsers user1 user2 usern..."


For Idle Timeout, use the ClientAliveInterval and ClientAliveCountMax directives.

For more details:

Code:
man sshd_config
Also, it's a good idea to search the forums first before posting questions. A lot of questions have already been asked and answered.
Hi

Thanks for your replay.I know all this settings but i want to limit the session for authenticated users. That means in my server i want to allow concurrent remote login only from 5 users if 6th user try he should get access denied
 
  


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 Help - How to limit concurrent logins by a user brokenpromises Linux - Server 4 03-29-2009 03:03 AM
How to logoff the remote ssh session of a user after a certain idle time. ashishshukla Linux - Server 3 10-07-2008 08:57 AM
How to run a program in an ssh session that will run after you close out the session? dr_zayus69 Linux - Networking 5 03-05-2006 07:15 PM
idle session timeouts rhelpm Linux - Networking 4 11-25-2005 03:46 AM
logout gnome if the session is idle? yenonn Linux - Newbie 0 10-07-2004 12:35 AM


All times are GMT -5. The time now is 03:27 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