ssh遠程訪問失敗 Centos7
命令ssh遠程訪問另外一台主機hadoop.master失敗
#ssh hadoop.master
報以下信息
[root@hadoop ~]# ssh hadoop.master @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The ECDSA host key for hadoop.master has changed, and the key for the corresponding IP address 192.168.121.130 is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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:/KCwo40lFi2rj2e62EkqJvlCnSsDnRv+W9/PtTog6ME. 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:1 ECDSA host key for hadoop.master has changed and you have requested strict checking. Host key verification failed.
刪除在上面顯示訪問失敗的主機信息, 進入文件 .ssh/know_hosts
#vi .ssh/known_hosts
刪除訪問失敗的主機信息IP和密鑰記錄(可能是),保存退出,重新訪問。