|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Locking certain users out of ssh login
I want to set up a ssh server so that only certain users can log in. I would like to have some type of file that I can just list the usernames that can login via ssh and if they are not in that list they are not allowed to log in. I am using freeBSD and openSSH. I just can't seem to find any options like above in configuration files.
|
|
#2
|
||||
|
||||
|
Simply change the shell of those you don't want to log in to /sbin/nologin. man chsh or vipw for more details.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
Open up sshd_config and add
DenyGroups groupname Then create a group called groupname(or whatever you used instead) and add all non allowed users into it. |
|
#4
|
|||
|
|||
|
is there anything like AllowGroups, which will only allow users in the ground that I choice and deny everyoe else
|
|
#5
|
|||
|
|||
|
When in doubt...
#man sshd_config Works wonders. Since AllowGroups starts with A, you will actually see it without scrolling. Always 'man' the thing you are wondering about. 9 times out of 10 FreeBSD has a manpage for it.
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Locking certain users out of ssh login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|