반응형
REMOTE HOST IDENTIFICATION HAS CHANGED!
오류 메시지와 내용
고객사에서 서버 교체가 있엇다. 교체 완료 후 다시 접속하려는데 다음과 같은 메시지가 나왔다. 말 그대로 리모트 호스트 증명이 변경되었다는 것이다.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ED25519 key sent by the remote host is
SHA256:X/du4J4gbPRvlqq56iR5iLzbyyijQ/tFgT2bGsM5Pck.
Please contact your system administrator.
Add correct host key in /Users/woong/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/woong/.ssh/known_hosts:34
Host key for 호스트주소 has changed and you have requested strict checking.
Host key verification failed.
해결 방법
해결 방법은 간단하다.
ssh-keygen -R 호스트IP혹은도메인
실행하니 다음과 같은 메시지가 나왔다.
# Host 호스트IP found: line 32
# Host 호스트IP found: line 33
# Host 호스트IP found: line 34
/Users/myusername/.ssh/known_hosts updated.
Original contents retained as /Users/myusername/.ssh/known_hosts.old
테스트
다시 접속하면 다시 fingerprint를 등록하겠냐는 메시지가 나타난다. yes 하고 기존처럼 진행하면 된다.
ssh username@호스트IP
The authenticity of host '호스트 (호스트IP)' can't be established.
ED25519 key fingerprint is SHA256:X/du4J4gbPRvlqq56iR5iLzbyyijQ/tFgT2bGsM5Pck.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
반응형