登高而望 2022-07-04 10:14 采纳率: 22.2%
浏览 51
已结题

服务器ansible提示没有sshpass服务

问题遇到的现象和发生背景

在使用ansible的时候提示to use the 'ssh' connection type with passwords, you must install the sshpass program

问题相关代码,请勿粘贴截图
ansible all -m shell -a "df -h

运行结果及报错内容
[root@localhost ansible]# ansible all -m shell -a "df -h"
192.166.22.153 | FAILED | rc=-1 >>
to use the 'ssh' connection type with passwords, you must install the sshpass program

我的解答思路和尝试过的方法

网上都说是没有sshpass,但是实际我这个之前用是好好的,就是前几天突然不能用了。而且sshpass也是有的

[root@localhost ansible]# rpm -qa | grep sshpass
sshpass-1.06-2.el7.x86_64


我想要达到的结果
  • 写回答

1条回答 默认 最新

  • aabbabababaa 2022-07-04 14:26
    关注

    是客户机返回的,没有sshpass吧

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 7月19日
  • 创建了问题 7月4日