Fix lỗi: “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”


Khi thực hiện kết nối ssh tới 1 linux server với file private key, nhưng gặp lỗi dưới đây.

[user@localhost ~]$ ssh root@vinasupport.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.
Please contact your system administrator.
Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.
Offending RSA key in /var/lib/sss/pubconf/known_hosts:2
RSA host key for pong has changed and you have requested strict checking.
Host key verification failed.

Lý do xuất hiện lỗi này là ssh keys trên server đã bị thay đổi. Còn trên client vẫn đang lưu thông tin ssh key cũ vì vậy chúng ta cần update lại thông tin trên client.

Để khắc phục lỗi này trên máy client (linux) chạy lệnh sau đây

ssh-keygen -R <host>

Với <host> là địa chỉ IP hoặc Hostname

VD:

ssh-keygen -R 192.168.3.10

Nguồn: vinasupport.com

             
SHARE

Bài viết liên quan

mode_edit Bình luận của bạn

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

account_circle
web