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的信息即可.
报错2:Connection refused\r\nConnection timed out during banner exchange
解决办法:
登录目标服务器10.x.x.x的修改
(39条消息) 使用ansible时显示Failed to connect to the host via ssh_sdd220的博客-CSDN博客
https://blog.csdn.net/sdd220/article/details/78560346
Original: https://www.cnblogs.com/paul8339/p/16542832.html
Author: paul_hch
Title: 使用ansible时显示Failed to connect to the host via ssh【转】