January 16th, 2006, 03:43 PM
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.
January 16th, 2006, 04:00 PM
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
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
March 29th, 2006, 06:20 PM
Open up sshd_config and add
Then create a group called groupname(or whatever you used instead) and add all non allowed users into it.
March 29th, 2006, 08:05 PM
is there anything like AllowGroups, which will only allow users in the ground that I choice and deny everyoe else
April 1st, 2006, 09:42 PM
When in doubt...
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.