我在
Rundeck 4.10 community version with ubuntu 22
有一个节点,我正在尝试从 Rundeck 进行 SSH。它给出身份验证错误。节点如下
<node name="node-name" description="node-description" tags="reg"
hostname="node-name" username="ubuntu"
osFamily="unix" osName="Ubuntu">
</node>
我的 SSH 密钥位于服务器上的以下路径中:
/home/ubuntu/rundeck/privatekey.pem
在 Rundeck 存储上,它位于以下路径:
keys/project/project_name/privatekey
此目标节点也在 Ubuntu 22 上运行。但是我还有在 Ubuntu 18 上运行的其他节点,并且我能够使用现有的 SSH 密钥配置在这些节点上执行来自 Rundeck 的作业,但在 Ubuntu 22 的节点上除外。我的其他节点节点正在工作,而无需在资源文件中提及 ssh-key-storage-path 名称。我也在 resources.xml 文件中添加了 ssh-key-storage-path 属性,并尝试从 Rundeck 运行该作业。
我尝试从 Rundeck shell 连接到这个 ubuntu 22 目标服务器,它工作正常,但从 Rundeck GUI ,它给出身份验证错误。 以下是错误的详细信息:
Authentication failure connecting to node: "node-name". Could not authenticate.
Failed dispatching to node node-name: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "node-name". Could not authenticate.
Execution failed: in project project-name: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [node-name: AuthenticationFailure: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "node-name". Could not authenticate.]}, Node failures: {node-name=[AuthenticationFailure: [jsch-scp] Failed copying the file: Authentication failure connecting to node: "node-name". Could not authenticate.]}, status: failed]
有人可以帮我吗?
在某些现代 Linux 发行版中,默认 SSH 节点执行器需要进行一些更改才能与默认 Rundeck SSH 节点执行器一起使用。
选项 1:使用 SSHJ 节点执行器而不是“SSH”默认节点执行器。为此,请转到“项目”>“项目设置”(左侧菜单)>“编辑配置”>“默认节点执行器/文件复制器”(选项卡),然后选择 SSHJ(在两个选项卡上)。
选项 2:在远程 SSH 服务器中,编辑
sshd_config
文件并添加以下内容:
PubkeyAcceptedKeyTypes +ssh-rsa
然后,重新启动 SSH 服务。