LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 12-18-2007, 05:53 AM   #1
bzfxn6
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
Limiting user SSH Connections


I am looking to lock down how many active connections a user can have on ssh.

I did think I can just make an entry in the limits.conf file, and then change the pam conf for sshd. But for some reason it did not work.

If anyone has done this before can they point out my mistake.

Redhat version

cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

limits.conf

tail limits.conf
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

* - maxlogins 3
# End of file

pam sshd

cat /etc/pam.d/sshd
#%PAM-1.0
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_loginuid.so
session required pam_limits.so
 
Old 12-18-2007, 09:43 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You can do that through pam.
 
Old 12-20-2007, 07:02 AM   #3
bzfxn6
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Any surgestions on what I need to do to the PAM conf to make it work.

I have logged a call with Redhat, but I have not had a reply back now for a few days.
 
  


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
RHEL 4: limiting VNC connections ossnap Linux - Enterprise 1 02-20-2007 03:36 PM
[shorewall]: Limiting SSH connections coralsaw Linux - Security 1 07-16-2006 07:48 AM
SuSe 9.2 limiting FTP connections compfused Linux - Networking 1 02-11-2005 05:05 PM
limiting ssh sessions for a given user breenbaron Linux - Security 2 03-16-2004 10:20 AM
Limiting no. of connections per IP ^Uri^ Linux - Networking 2 08-16-2003 12:44 AM


All times are GMT -5. The time now is 10:27 AM.

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