Operating System - HP-UX
1826546 Members
4426 Online
109695 Solutions
New Discussion

Re: DenyUsers in sshd_config

 
dev44
Regular Advisor

DenyUsers in sshd_config

Hi,

WE have over 300 users that we don't want direct login to thru ssh. I an add all 300 to the DenyUsers but I was wondering if anyone knew if DenyUsers could be pointed to a file that lists them. From what i see, you can't...but figured I'd check here as you guys sometimes have great ideas.

Thanks
whatever
3 REPLIES 3
Autocross.US
Trusted Contributor

Re: DenyUsers in sshd_config

I would add all the users to a group and then use the 'DenyGroups' directive to accomplish this task.



I drive way too fast to worry about calories.
dev44
Regular Advisor

Re: DenyUsers in sshd_config

But then I have to add 300 users to a new group that has to be created on each server correct?

I can add wildcards in the DenyUsers which will cut the list in half, it would just be handy if it could read a file....but I am pretty sure it won't do that.
whatever
Mel Burslan
Honored Contributor

Re: DenyUsers in sshd_config

Or, if the number of users who are allowed to login via ssh, you can deny everyone than add users allowed by using

AllowUsers weblogic www user1 user5
AllowUsers sysadmin

etc.
________________________________
UNIX because I majored in cryptology...