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.
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
#* 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
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