使用ansible時顯示Failed to connect to the host via ssh
fatal: [192.168.0.2]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nIT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\r\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)!\r\nIt is also possible that a host key has just been changed.\r\nThe fingerprint for the ECDSA key sent by the remote host is\n7d:90:8f:e0:c4:6c:b7:31:74:32:96:4a:bd:f4:45:71.\r\nPlease contact your system administrator.\r\nAdd correct host key in /root/.ssh/known_hosts to get rid of this message.\r\nOffending RSA key in /root/.ssh/known_hosts:378\r\nECDSA host key for 192.168.0.2 has changed and you have requested strict checking.\r\nHost key verification failed.\r\n”, “unreachable”: true}
vim ~/.ssh/known_hosts
刪除192.168.0.2的相關rsa的資訊即可.