小编Ehs*_*ati的帖子

Jenkins中的算法协商失败

在Jenkins的算法协商失败SSH中看到了相同问题的答案

我面临同样的问题,但更新ss_config没有帮助,我仍然得到相同的错误.我还有另一个问题,可能与此有关.在Jenkins的一般配置中,我将构建slave作为远程主机添加,并为其指定了主机名,端口,用户名和密钥文件路径,但仍然显示"无法连接到服务器".我想知道为什么,因为如果我登录Jenkins机器,我可以使用相同的密钥文件轻松地在命令行中连接到我的远程主机.

更新:

这是我添加到ssh_config的行:

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Run Code Online (Sandbox Code Playgroud)

这是Jenkins的控制台输出:

[SSH] Exception:Algorithm negotiation fail
com.jcraft.jsch.JSchException: Algorithm negotiation fail
    at com.jcraft.jsch.Session.receive_kexinit(Session.java:520)
    at com.jcraft.jsch.Session.connect(Session.java:286)
    at com.jcraft.jsch.Session.connect(Session.java:150)
    at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:141)
    at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:151)
    at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.Build$BuildExecution.build(Build.java:205)
    at hudson.model.Build$BuildExecution.doRun(Build.java:162)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
    at hudson.model.Run.execute(Run.java:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:381)
Build step 'Execute shell script on remote host using ssh' marked build as failure
[SSH] executing post build script:
Run Code Online (Sandbox Code Playgroud)

java ssh jenkins

2
推荐指数
1
解决办法
3704
查看次数

标签 统计

java ×1

jenkins ×1

ssh ×1