Link to home
Start Free TrialLog in
Avatar of IKeystone
IKeystoneFlag for United States of America

asked on

Block password authetication on specific user on Linux

Hi,
I need to block password authentication for only specific users on Linux server, and leave key
option only. User can't be blocked to use password for other protocols like ftp

All changes should be done in sshd_config file
For UNIX I use following but it block all users on Linux

PasswordAuthDenyUsers user1 user2 user3
ChallRespAuthDenyUsers  [pam] user1 user2 user3

Thanks
Avatar of skullnobrains
skullnobrains

create a group for your user in sshd_conf and deny whatever types of authentication you need in that group
Avatar of IKeystone

ASKER

Can you send me an example ?
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial