Rundeck ssh:失败:AuthenticationFailure:连接到节点的身份验证失败:

Rundeck ssh: Failed: AuthenticationFailure: Authentication failure connecting to node:

我正在 RHEL 7.7

上从 Docker 1.13.1 测试 rundeck 3.3.0

我有以下节点:

  oc3583155071  keys/local/root     password    
    Operating System    Linux
    ssh-authentication: password 
    sudo-command-enabled:   true 
    sudo-password-storage-path: keys/local/root

这些是它的密钥存储:

  keys/local

  2 keys
    neslarra  Password
    root      Password             <<<<<<==============

    Storage path: keys/local/root 
    Created: 5:27 pm by: admin

我从 rundeck shell 测试了 ssh 连接,它工作正常:

  rundeck@9ce08386edcd:~$ ssh root@oc3583155071
  root@oc3583155071's password: 
  [root@oc3583155071 ~]# uname -n; whoami
  oc3583155071
  root
  [root@oc3583155071 ~]#

但是,当我尝试从 runeck GUI 执行命令时,它返回了这个错误:

  Nodes   oc3583155071
  Recent: uname -n; whoami
   
  >  uname -n; whoami #28 
  Failed: AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate.
  Execution failed: 28 in project Test1: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [oc3583155071: AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate. + {dataContext=MultiDataContextImpl(map={ContextView(node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(step:1, node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, Node failures: {oc3583155071=[AuthenticationFailure: Authentication failure connecting to node: "oc3583155071". Could not authenticate. + {dataContext=MultiDataContextImpl(map={ContextView(node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}, ContextView(step:1, node:oc3583155071)=BaseDataContext{{exec={exitCode=-1}}}}, base=null)} ]}, status: failed]

帮助将不胜感激(很多!!!)。 内斯特.

您需要配置您的 ssh 目标节点并在 Rundeck 的节点源上正确设置,您的节点定义需要更多属性,我将这些步骤从头开始配置:

  1. 确保您的目标 ssh 配置允许密码登录(在 /etc/ssh/sshd_config 配置文件上启用 PasswordAuthentication yes 并重新启动 sshd 服务:systemctl restart sshd).

  2. 在 Rundeck 端 create 稍后在 resources.xml 文件中引用它的密码密钥(ssh-password-storage-path 属性)。

  3. 在 Rundeck 端,确保您使用的是 well-configured 节点 definition。我使用了以下 resources.xml 内容示例:

<?xml version="1.0" encoding="UTF-8"?>
<project>
 <node name="remote" description="remote ssh node" osFamily="unix" username="vagrant" hostname="192.168.33.20" ssh-authentication="password" ssh-password-storage-path="keys/sshpasswd" />
</project>
  1. 测试向您的新节点发送任何命令,在 Rundeck GUI 上,转到“命令”(左侧菜单)和 select 您在“节点”文本框上的节点(使用 name: <your-node-name>)并发送任何命令(“输入命令”文本框),您必须 see 结果。