小编pra*_*een的帖子

无法通过 ssh 连接到主机:主机密钥验证失败

我在执行 Jenkins 的 ansible-playbook 时遇到问题,

喜欢 :

PLAY [centos-slave-02] *********************************************************



TASK [Gathering Facts] *********************************************************

fatal: [centos-slave-02]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed.", "unreachable": true}

PLAY RECAP *********************************************************************

centos-slave-02            : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   
Run Code Online (Sandbox Code Playgroud)

但我能够得到乒乓响应,每次都要求

Matching host key in /var/jenkins_home/.ssh/known_hosts:5  :
Run Code Online (Sandbox Code Playgroud)
jenkins@c11582cb5024:~/jenkins-ansible$ ansible -i hosts -m ping centos-slave-02

Warning: the ECDSA host key for 'centos-slave-02' differs from the key for the IP address '172.19.0.3'

Offending key for …
Run Code Online (Sandbox Code Playgroud)

ssh centos ssh-keys jenkins ansible

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

ansible ×1

centos ×1

jenkins ×1

ssh ×1

ssh-keys ×1