身份验证失败连接到节点 – 在Rundeck上出现无法验证的错误

huangapple go评论49阅读模式
英文:

Authentication failure connecting to node - Could not authenticate error on Rundeck

问题

我有一个在Rundeck 4.10社区版与Ubuntu 22上的节点,我正在尝试从Rundeck进行SSH连接。它报出了身份验证错误。节点配置如下:

<node name="节点名称" description="节点描述" tags="reg"
        hostname="节点名称" 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连接时,它报出身份验证错误。以下是详细的错误信息:

身份验证失败,无法连接到节点"节点名称"。无法进行身份验证。
在项目project-name中执行失败:[工作流结果:,步骤失败:{1=在1个节点上派遣失败:[节点名称:AuthenticationFailure:[jsch-scp]复制文件失败:身份验证失败,无法连接到节点:"节点名称"。无法进行身份验证。]},节点失败:{节点名称=[AuthenticationFailure:[jsch-scp]复制文件失败:身份验证失败,无法连接到节点:"节点名称"。无法进行身份验证。]},状态:失败]

有人可以帮助我吗?

英文:

I have a node in Rundeck 4.10 community version with ubuntu 22 where I am trying to make SSH from Rundeck. Its giving authentication error. The node is as follows

&lt;node name=&quot;node-name&quot; description=&quot;node-description&quot; tags=&quot;reg&quot;
        hostname=&quot;node-name&quot; username=&quot;ubuntu&quot;
        osFamily=&quot;unix&quot; osName=&quot;Ubuntu&quot;&gt; 
&lt;/node&gt;

My SSH key is in this path on the server: /home/ubuntu/rundeck/privatekey.pem

And on Rundeck storage, it is in this path: keys/project/project_name/privatekey

This target node is also running on Ubuntu 22. But I have other nodes which are running on Ubuntu 18 and I am able to execute jobs from Rundeck on these nodes with this existing SSH key configuration except on the node with Ubuntu 22. My other nodes are working without mentioning the ssh-key-storage-path name in resources file. I added ssh-key-storage-path attribute also in the resources.xml file an tried running the job from Rundeck.

I tried connecting to this ubuntu 22 target server from Rundeck shell and it is working fine but from Rundeck GUI, its giving authentication error.
Below is the error in detail:

   Authentication failure connecting to node: &quot;node-name&quot;. Could not authenticate.
Failed dispatching to node node-name: [jsch-scp] Failed copying the file: Authentication failure connecting to node: &quot;node-name&quot;. 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: &quot;node-name&quot;. Could not authenticate.]}, Node failures: {node-name=[AuthenticationFailure: [jsch-scp] Failed copying the file: Authentication failure connecting to node: &quot;node-name&quot;. Could not authenticate.]}, status: failed]

Can someone help me in this?

答案1

得分: 0

在一些现代的Linux发行版中,要使默认的SSH节点执行器与默认的Rundeck SSH节点执行器一起工作,需要进行一些更改。

选项1:使用SSHJ节点执行器,而不是“SSH”默认节点执行器。要这样做,请转到项目 > 项目设置(左侧菜单) > 编辑配置 > 默认节点执行器/文件复制器(选项卡),然后在两个选项卡上都选择SSHJ。

选项2:在您的远程SSH服务器上,编辑 sshd_config 文件并添加以下内容:

PublickeyAcceptedKeysTypes +ssh-rsa

然后重新启动SSH服务。

英文:

In some modern linux distrubutions the default SSH Node Executor needs some changes to work with the default Rundeck SSH node executor.

Option 1: Use the SSHJ node executor instead of the "SSH" default node executor. To do so, go to the Project > Project Settings (left menu) > Edit Configuration > Default Node Executor/File Copier (tabs) and select SSHJ (on both tabs).

Option 2: In your remote SSH server, edit the sshd_config file and add this:

PublickeyAcceptedKeysTypes +ssh-rsa

Then, restart the SSH service.

huangapple
  • 本文由 发表于 2023年7月10日 15:10:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76651430.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定