我的jenkins slave节点处于脱机状态。日志如下:
[06/11/15 09:02:52] [SSH] Opening SSH connection to <ip>.
ERROR: Server rejected the 1 private key(s) for jenkins (credentialId:d7a17c00-1300-4cf3-8cf5-810b3297ebc6/method:publickey)
[06/11/15 09:02:52] [SSH] Authentication failed.
hudson.AbortException: Authentication failed.
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1178)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[06/11/15 09:02:52] Launch failed - cleaning up connection
[06/11/15 09:02:52] [SSH] Connection closed.
我已在下面核实过:
我也尝试过来自主机的&#34; ssh -i .ssh / id_rsa -l jenkins,但它要求输入密码。看起来它没有识别奴隶机器。
主机和从机的.ssh文件夹中都有known_hosts文件。 那里有什么数据?
如何解决问题?
答案 0 :(得分:0)
我最近刚经历过这种痛苦。
我发现你必须确保.ssh目录有700个权限,并且jenkins已经读取并且id_rsa.pub应该有644(不是之前推荐的755,这将使文件可执行,不应该被要求)。
此外,我发现如果你有一个基于Windows的奴隶,你必须确保你创建你的密钥没有密码短语。