간혹 ssh 원격 접속 시 아래와 같은 오류 메시지가 뜨며 접속 실패하는 경우가 있다.
[root@localhost ~]# ssh root@{IP}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Zu5tNyx0BgVrAHbjSPosyvJN4xmybLx2zfAvo4Qyx3Y.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:60
ECDSA host key for {IP} has changed and you have requested strict checking.
Host key verification failed.
해결 방법은 간단하다.
ssh-keygen -R [ IP or DomainName]
위 명령어를 수행하여 ssh-keygen을 초기화 삭제한 후 ssh 원격 접속을 재시도하면 정상 접속됨을 확인 가능하다.
'Linux > 공통' 카테고리의 다른 글
Linux OS 별 docker-compose 설치 방법 (0) | 2025.01.24 |
---|---|
SSH 접속시 RSA 공유키 충돌 문제 해결 (0) | 2021.11.10 |
root 계정으로 ssh 접속 허용하는 방법 (0) | 2021.10.28 |