PermitRootLogin
sshd_config 옵션이 "yes"로 설정되어 있는데도 ssh에 연결할 수 없습니다.
ssh localhost
root@localhost's password:
Permission denied, please try again.
내 전체 콘텐츠는 다음과 같습니다 sshd_config
.
PasswordAuthentication yes
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
PermitRootLogin yes
AllowUsers otheruser
루트로 SSH 연결을 차단하는 것은 무엇이며 이를 해결하는 방법은 무엇입니까?
답변1
사용자 허용
지정된 경우 이러한 패턴 중 하나와 일치하는 사용자 이름만 로그인이 허용됩니다.
목록에 루트를 추가합니다.
AllowUsers root otheruser