I'm trying to modify
/etc/ssh/sshd_config on my dedicated debian7 server with both
AllowGroups. However I can't seem get both to work together.
- There's a user called
That user is in a group called
$ groups testuser testuser : testuser ssh-users
testuseris trying to connect via
ssh testuser@<server_ip>and entering their password.
sshd_configcan be found here: http://pastebin.com/iZvVDFKL - I think basically the only changes I made from default was:
- to set
- and add two users with
AllowUsers(actual usernames differ on my server)
- to set
service ssh restartis run each time after modifying
testusercan connect when set with
AllowUsers user1 user2 testuser
testusercan NOT connect when setting
AllowGroupsfor its group:
AllowUsers user1 user2 AllowGroups ssh-users
which results in
Permission denied, please try again.when
testuserenters their password in the ssh password prompt.
- What's the best way to fix this without manually adding the username to
AllowUsers? Ideally I'd like to be able to just add users to the
ssh-usersgroup in the future without having to touch
Ideally I'd like to be able to just add users to the ssh-users group in the future without having to touch sshd_config again.- So why are you using AllowUsers at all? Just put everyone in the group/groups.