无法通过SSH启动Jenkins代理

时间:2017-09-29 16:57:29

标签: jenkins ssh

我已经设置了一个Jenkins主服务器(用户:jenkins)和一个Jenkins服务器(用户:jenkinslave)。

我在它们之间建立了SSH连接,我可以从主服务器到服务器从SSH连接。我配置了从属节点,给出了远程根目录(/var/lib/jenkinslave)并使用“使用SSH启动从属”方法启动它。但奴隶离线;我已经尝试了所有主机验证策略,但我仍然得到:

  

[SSH]身份验证失败。

我能够建立SSH连接,但身份验证失败。我提供了jenkinslave凭据,但它们是正确的。

手动信任的关键策略:

[09/29/17 16:51:17] [SSH] Opening SSH connection to ip-10-0-2-218.ap-south-1.compute.internal:22.
[09/29/17 16:51:17] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
[09/29/17 16:51:17] [SSH] Authentication failed.
Authentication failed.
[09/29/17 16:51:17] Launch failed - cleaning up connection
[09/29/17 16:51:17] [SSH] Connection closed

主机密钥策略:

[09/29/17 16:53:40] [SSH] Opening SSH connection to ip-10-0-2-218.ap-south-1.compute.internal:22.
[09/29/17 16:53:41] [SSH] SSH host key matches key in Known Hosts file. Connection will be allowed.
[09/29/17 16:53:41] [SSH] Authentication failed.
Authentication failed.
[09/29/17 16:53:41] Launch failed - cleaning up connection
[09/29/17 16:53:41] [SSH] Connection closed.

我已经阅读了一些他们建议使用手动密钥的文章,我在上面做过,但仍然认证失败了。 我在这里错过了什么?

1 个答案:

答案 0 :(得分:0)

您是否在主服务器上的〜jenkins / .ssh中创建了ssh密钥?请尝试以下操作:

ln -s〜jenkins / .ssh〜jenkins / ssh

这对我来说也很不合理,但对我而言确实有效。