Failed to connect to the host via ssh: Permission denied 权限拒绝

说明:没有ssh秘钥认证。
ansible是基于ssh秘钥认证的,估生成秘钥,重新分发下公钥就ok了,注意主控节点也要ssh-copy-id IP  (自己的IP)

[devops@server1 ansible]$ ansible-playbook -C ansible-var01.yml 
 
PLAY [oldboy] ************************************************************************************************************************
 
TASK [Gathering Facts] ***************************************************************************************************************
fatal: [172.25.28.1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
fatal: [172.25.28.2]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
fatal: [172.25.28.3]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).", "unreachable": true}
 
PLAY RECAP ***************************************************************************************************************************
172.16.1.31                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   
172.16.1.41                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐