aws 접속 시 "REMOTE HOST IDENTIFICATION HAS CHANGED!' 오류 해결하기
Post

aws 접속 시 "REMOTE HOST IDENTIFICATION HAS CHANGED!' 오류 해결하기

Problem

ec2 접속이 아래와 같이 갑자기 안되는 경우가 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:7E54PYiIr4DE3iSVIi6PPLLOJbTEXT7uf348g0Zv12Q.
Please contact your system administrator.
Add correct host key in /Users/test/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/test/.ssh/known_hosts:6
ECDSA host key for 77.77.77.77 has changed and you have requested strict checking.
Host key verification failed.

Cause

원격 서버가 IP는 그대로인데 환경이 바뀐 경우 발생 할 수 있다.

Solution

사용 계정 아래 .ssh/known_hosts 파일에 해당 IP를 정보를 삭제하거나 파일 자체를 삭제해준다.
그러면 재접속시 새로운 fingerprint를 만들어 known_hosts 파일에 저장되고 접속이 된다.

1
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes