본문 바로가기
Develop/Linux

SSH 접속 시 [ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! ]

by bellsilver7 2016. 11. 19.
728x90

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@    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:FOaS1rxHVDCuZrSnA+2sj741/sqfN6FWb17qnIZM1ms.

Please contact your system administrator.

Add correct host key in ~/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in ~/.ssh/known_hosts:2

ECDSA host key for [localhost]:포트 has changed and you have requested strict checking.

Host key verification failed.


필자의 예로는 Mac에서 Virtual Box에 VM을 하나 설치하여 사용하다가 새로운 VM을 설치하여 접속할 때 위와 같은 문제가 발생했다.

동일한 아이피에 동일한 포트로 접속할 때 host에 대한 키 값이 변경되어 접속을 막는 것 같다.



[해결 방법]

$ ssh-keygen -R 서버IP

~/.ssh/known_hosts updated.

Original contents retained as ~/.ssh/known_hosts.old


ssh 재접속

$ ssh root@서버IP

or

$ ssh -p 포트 root@서버IP

Are you sure you want to continue connectiong (yes/no)? yes

728x90

댓글