Algorithm negotiation fail problem

903 views
Skip to first unread message

Ehsan Enayati

unread,
Sep 17, 2015, 4:28:09 AM9/17/15
to Jenkins Users
Hi, I am trying to build my code on an ubuntu machine. When I start the build I always get below error:

[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:

On the other hand in Jenkins general configuration I added a remote host (which is the ubuntu machine I am trying to connect to). I gave it the hostname, port, username, and keyfile. But it still says "Can't connect to server". It is interesting, because if I login into my jenkins machine I can connect to my remote host using command line, so I am sure the key files are correct.
I also googled the error above and found something about missing encryption algorithm in ssh_config, I tried that but did not help.

Thanks for your helps


suri k

unread,
Mar 1, 2018, 2:50:10 AM3/1/18
to Jenkins Users
Hi, i am also facing the same issue, if you get fix can you forward the same.

Björn Pedersen

unread,
Mar 1, 2018, 3:05:32 AM3/1/18
to Jenkins Users
Hi,

you probably need to update  SSH plugins:

https://plugins.jenkins.io/publish-over-ssh -> 1.14 has a newer Jsch that provides the new algorithms.
For ssh plugin (https://plugins.jenkins.io/ssh), you need to get an update on
https://github.com/jenkinsci/jsch-plugin/  to 0.1.54.2  mot probably.

Björn
Reply all
Reply to author
Forward
0 new messages