验证失败

时间:2014-11-20 13:18:05

标签: linux ssh jenkins hudson

设置了从节点后出现此错误,有人请帮助〜 我可以毫无问题地在奴隶节点上进行ssh,它只发生在jenkins上。

[11/20/14 21:01:30] [SSH] Opening SSH connection to 10.105.5.34:22.
[11/20/14 21:01:30] [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$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    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:724)
[11/20/14 21:01:30] Launch failed - cleaning up connection
[11/20/14 21:01:30] [SSH] Connection closed.
jenkins版本是最新的1.59,ssh插件也是最新的

1 个答案:

答案 0 :(得分:0)

尝试使用此命令ssh到主机:

ssh -v -i~ / .ssh / id_rsa remoteuser @ server

其中id_rsa(或dsa)是你的密钥。测试它很好,因为这可能是你的问题所在。在服务器上查看auth.log。如果出现以下情况,您应该能够看到错误:

  • 主页权限/所有权不正常
  • .ssh权限/所有权不正常
  • 密钥权限/所有权不正常

基于密钥的身份验证对密钥,home和.ssh文件夹的权限非常严格。特别是如果在SSH服务器的sshd_config中打开严格模式。你应该有类似的东西:

chmod go-w~ /
chmod 700~ / .ssh
chmod 600~ / .ssh / authorized_keys