rho 命令因无效身份验证错误而失败

rho 命令因无效身份验证错误而失败

我正在尝试rho在 rhel7.6 上使用本地主机的命令。系统在开发者订阅下订阅了redhat。这是详细信息

[root@redhat7-1 ~]# rho profile list
Please enter your rho vault password:
No profiles exist yet.
[root@redhat7-1 ~]# rho auth list
Please enter your rho vault password:
No credentials exist yet.
[root@redhat7-1 ~]# rho auth add --name roothost1 --username root --sshkeyfile ~/.ssh/id_rsa
Please enter your rho vault password:
Auth "roothost1" was added
[root@redhat7-1 ~]# rho profile add --name mynetwork --hosts 192.168.56.107 --auth roothost1  # 192.168.56.107  is my localhost ip
Please enter your rho vault password:
Profile "mynetwork" was added
[root@redhat7-1 ~]# rho scan --profile mynetwork --reportfile ./mynetwork_scan.csv
Please enter your rho vault password:
Connection discovery will be perform with the following auth credentials: roothost1
Note: Any ssh-agent connection setup for a target host will be used as a fallback if it exists.

Attempting connection discovery to 1 systems with auth "roothost1" using a timeout of 5 minutes.
All auths are invalid for this profile
[root@redhat7-1 ~]# rho profile list
Please enter your rho vault password:
[
    {
        "auth": [
            {
                "id": "8663a7cb-31bf-4644-9631-d8bd0c8df900",
                "name": "roothost1"
            }
        ],
        "hosts": [
            "192.168.56.107"
        ],
        "name": "mynetwork",
        "ssh_port": "22"
    }
]
[root@redhat7-1 ~]# rho auth list
Please enter your rho vault password:
[
    {
        "id": "8663a7cb-31bf-4644-9631-d8bd0c8df900",
        "name": "roothost1",
        "password": null,
        "ssh_key_file": "/root/.ssh/id_rsa",
        "sudo_password": null,
        "username": "root"
    }
]
[root@redhat7-1 ~]# ssh "192.168.56.107"
Last login: Wed Sep 18 13:50:07 2019 from 192.168.56.107
[root@redhat7-1 ~]# logout
Connection to 192.168.56.107 closed.
[root@redhat7-1 ~]#

是否有其他方法可以将身份验证映射到特定主机,或者我们必须在任何 rho 命令中定义任何其他强制选项?我无法从手册页或任何文档中弄清楚它。

答案1

我使用的是 Rho 版本“0.0.34”和 ansible 版本 2.8。 rho的python源代码有问题。在文件/usr/lib/python2.7/site-packages/rho/host_discovery.py第 53 行中。它应该CHANGED代替SUCCESS.

相关内容