SSH Help - How to limit concurrent logins by a user
Hello,
I'm trying to stop users from logging in more than once via a certain shell account. Is there an easy way to do this? Probably a 2 minute job for the pros. Any help appreciated! |
I believe that in /etc/ssh/sshd_config you can set MaxStartups. Where it's located in the file makes it global. If you want to set it per user, look at the bottom of the conf file for examples.
|
Thanks for the reply, however I wasn't very successful :(
I uncommented MaxStartups in /etc/ssh/sshd_config and set it to "1", and restarted sshd, but I was still able to login multiple times. Code:
$ w Code:
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $ |
My bad. Try /etc/security/limits.conf.
* hard maxlogins 4 The asterisk means global. 4 is the number of concurrent logins. |
MaxStartups... affects max # of unauthenticated logins/attempts
limits.conf affects more than just ssh Are you running sshd standalone or through xinetd or similar? |
All times are GMT -5. The time now is 09:00 AM. |