繁体   English   中英

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 端创建一个密码密钥,以便稍后在resources.xml文件( ssh-password-storage-path属性)中引用它。

  3. 在 Rundeck 方面,确保您使用的是配置良好的节点定义 我使用了以下resources.xml 。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 上,go 到“命令”(左侧菜单)和 select 您的节点在“节点”文本框(使用name: <your-node-name> )并发送任何命令(“Enter命令”文本框),您必须看到结果。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM