나는 수정하기 위해 노력하고있어 /etc/ssh/sshd_config모두 내 전용 debian7 서버 AllowUsers와 AllowGroups. 그러나 나는 둘 다 함께 일할 수는없는 것 같습니다.
설정
- 라는 사용자가
testuser있습니다. 해당 사용자는 다음과 같은 그룹에 있습니다
ssh-users.$ groups testuser testuser : testuser ssh-userstestuser연결을 시도ssh testuser@<server_ip>하고 비밀번호를 입력하려고합니다.- 내
sshd_config여기에서 찾을 수 있습니다 : http://pastebin.com/iZvVDFKL- 기본적으로 내가 기본값에서 한 유일한 변경 사항은 다음과 같습니다.- 설정
PermitRootLogin no - 두 명의 사용자를 추가하십시오
AllowUsers(실제 사용자 이름은 서버마다 다릅니다)
- 설정
service ssh restart수정 후 매번 실행됩니다sshd_config.
문제
testuser로 설정하면 연결할 수 있습니다AllowUsers:AllowUsers user1 user2 testusertestuser그룹을 설정할 때 연결할 수 없습니다AllowGroups:AllowUsers user1 user2 AllowGroups ssh-users어떤 결과
Permission denied, please try again.때testuserssh를 암호 프롬프트에 암호를 입력합니다.
질문
- 합니까의
AllowUsers재정AllowGroups? - 사용자 이름을 수동으로 추가하지 않고이를 해결하는 가장 좋은 방법은 무엇입니까
AllowUsers? 이상적으로ssh-users는 나중에sshd_config다시 만질 필요없이 그룹에 사용자를 추가 할 수 있기를 바랍니다.
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.-왜 AllowUsers를 사용합니까? 모든 사람들을 그룹 / 그룹에 넣으십시오.