• Khắc phục lỗi "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"

  • Thông báo lỗi bạn gặp và mọi người giúp fix.

Thông báo lỗi bạn gặp và mọi người giúp fix.
 #2604  by nguyenoanh
 06 Oct 2018 09:01
Khi bạn rebuild lại VPS và đăng nhập lại VPS mà bị báo lỗi như dưới:
ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 RSA key sent by the remote host is
SHA256:KWjeFAXtwNGcyIVr+hpBlONk3IUq+EuFykVYBt65CDA.
Please contact your system administrator.
Add correct host key in /Users/ngocoanh/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/ngocoanh/.ssh/known_hosts:90
RSA host key for 94.237.69.21 has changed and you have requested strict checking.
Host key verification failed.
Cách khắc phục rất đơn giản.

Bạn chỉ cần chạy lệnh:
Code: Select all
ssh-keygen -R IP_VPS
là được.
ssh-keygen -R 94.237.69.21
# Host 94.237.69.21 found: line 90
/Users/ngocoanh/.ssh/known_hosts updated.
Original contents retained as /Users/ngocoanh/.ssh/known_hosts.old
Bây giờ ta có thể truy cập VPS bình thường:
# ssh [email protected]
The authenticity of host '94.237.69.21 (94.237.69.21)' can't be established.
RSA key fingerprint is SHA256:KWjeFAXtwNGcyIVr+hpBlONk3IUq+EuFykVYBt65CDA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '94.237.69.21' (RSA) to the list of known hosts.
Password:
Get 25 USD Free To USE VPSSIM