OPS

Ubuntu 22버전 SSH 안 먹힐 때 sshd_config 파일 수정해보시길

찻잔속청개구리 2023. 2. 21. 13:56
반응형

참고한 블로그 먼저 말씀드립니다.

https://sangchul.kr/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-userauthpubkey-key-type-ssh-rsa-not-in-PubkeyAcceptedAlgorithms

 

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms 오류

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms 오류 테스트 환경 SSH Client(SecureCRT) SSH Server $ lsb_release -d Description: Ubuntu 22.04.1 LTS ssh server 로그 확인 tail -f /var/log/auth.log tail -f /var/log/auth.log ... Feb

sangchul.kr

 

Ubuntu 22.04 버전을 이제 막 이용하시려는 분들이 기존 RSA 키로 SSH 접속할 때 아래와 같은 오류를 확인 할 수 있습니다.

 

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms 

 

결론부터 말씀드리자면 이 오류는 SSH 서버가 RSA 키 유형을 허용하지 않아서 발생하고,

PubkeyAcceptedAlgorithms에 ssh-rsa를 추가하는 작업으로 해결할 수 있습니다.

 

vim /etc/ssh/sshd_config
PubkeyAcceptedAlgorithms +ssh-rsa
systemctl restart sshd

sshd_config 파일을 수정하고 나서는 반드시 sshd를 다시 시작해주셔야 합니다. 그래야 적용됩니다.

 

지금까지 Ubuntu 22버전에서 SSH 접속이 안 먹힐 때 해결방법에 대해 말씀드렸습니다.

 

감사합니다. 

반응형