userauth_pubkey: ssh-rsa 키 유형이 PubkeyAcceptedAlgorithms에 없음
테스트 환경
- SSH 클라이언트(SecureCRT)

- SSH 서버
$ lsb_release -d
Description: Ubuntu 22.04.1 LTS
SSH 서버 로그 확인
tail -f /var/log/auth.log
tail -f /var/log/auth.log
...
Feb 20 00:51:45 ip-10-201-9-166 sshd(1543): userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms (preauth)
Feb 20 00:51:45 ip-10-201-9-166 sshd(1543): userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms (preauth)
Feb 20 00:51:49 ip-10-201-9-166 sshd(1543): error: Received disconnect from 192.168.0.11 port 24783:14: Unable to authenticate using any of the configured authentication methods. (preauth)
Feb 20 00:51:49 ip-10-201-9-166 sshd(1543): Disconnected from authenticating user ubuntu 192.168.0.11 port 24783 (preauth)
이 오류는 SSH 서버가 RSA 키 유형을 허용하지 않기 때문에 발생합니다.
sshd_config 편집
- PubkeyAcceptedAlgorithms에 ssh-rsa 추가
vim /etc/ssh/sshd_config
PubkeyAcceptedAlgorithms +ssh-rsa
(또는)
echo "PubkeyAcceptedAlgorithms +ssh-rsa" >> /etc/ssh/sshd_config
SSH 서비스 다시 시작
systemctl restart sshd
참조 URL
– SecureCRT에 액세스할 때 키 교환 오류: https://scbyun.com/1521

