Ansible无法远程连接客户机

来源:互联网 发布:卸载kingroot的软件 编辑:程序博客网 时间:2024/06/05 21:04

Ansible主机环境:CentOs 7
Error description: “failed”: true, “msg”: “to use the ‘ssh’ connection type with passwords, you must install the sshpass program”

错误贴图:
这里写图片描述

Ansible使用sshpass程序通过SSH登录到服务器时使用的密码。处于安全原因,你应该ansible登录服务器使用SSH秘钥,但对于新服务器最初是简单的登录面,ansible设置用户和SSH秘钥,然后后续登录使用SSH秘钥。
下载路径:https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz/download

tar  -zxvf sshpass-1.06.tar.gzcd sshpass-1.06./configure

再次输入指令提示能够运行完成。
这里写图片描述

0 0