Infra/linux

[ssh] (Solution) WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

하우아유두잉 2019. 12. 13. 12:44

Environment: osx (Macbook pro)

 

ssh로 server에 connect시

Key or password 모두 accurate한데, below와 같은 message를 띄우며 connect이 failed 할 때가 있다.

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

@    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:.

Please contact your system administrator.

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

Offending ECDSA key in /var/root/.ssh/known_hosts:226

ECDSA host key for DOMAIN has changed and you have requested strict checking.

Host key verification failed.

 

Solution:

1. Open the '/var/root/.ssh/known_hosts' file.

2.Delete line.

/var/root/.ssh/known_hosts

3. Retry connect