1. 程式人生 > >linux之 ssh連接服務器,WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

linux之 ssh連接服務器,WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

ddl dmi sys 更換 list admin ble sha256 ini

[[email protected] ~]# ssh localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:r86jc/Vu8phhiKKDSntetfkmksjQ606ZlUP8XNYe44U.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:10
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password,keyboard-interactive).

說明: Add correct host key in /root/.ssh/known_hosts to get rid of this message. 重點在這句話

分析: ssh登錄過某機器後,因某機器有變動(更換ip等),再次登錄不了,報錯!!!

解決過程:

[[email protected] ~]# mv /root/.ssh/known_hosts /root/.ssh/known_hosts.bak

[[email protected] ~]# ssh -o StrictHostKeyChecking=no 172.16.38.130
Warning: Permanently added ‘172.16.38.130‘ (ECDSA) to the list of known hosts.
[email protected]‘s password:
Last login: Sun Oct 1 12:02:21 2017 from 172.16.74.104

[[email protected] ~]# ssh localhost ## 輸入密碼,OK!
Warning: Permanently added ‘localhost‘ (ECDSA) to the list of known hosts.
[email protected]‘s password:
Last login: Sun Oct 1 12:04:59 2017 from zk01

linux之 ssh連接服務器,WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!