com.jcraft.jsch.JSchException: Auth fail

tip

Ant scp task has an attribute called trust. If set to false (default) the host you connect to has to be set in the knownhosts file (you might have to create it) Another way is to explicitly set "trust = true". Check the documentation: https://goo.gl/G5680x

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • I consistently get this error when scp plugin tries to upload: {quote} Recording fingerprints Sending e-mails to: <me> [SCP] Connecting to <hostname> ERROR: Failed to upload files com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:473) at com.jcraft.jsch.Session.connect(Session.java:145) at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:149) at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:106) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1296) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) Finished: UNSTABLE {quote} This only happens when uploading to a host that's behind a firewall. It can succesfully upload to a host on the same network as the Hudson master and slave. I can manually, using "system" scp, upload files to the host through the firewall with no problems. The "auth.log" file on the remote host is not touched by Hudson's attempts to upload, indicating that it's not the host itself that denies access.
    via by torbent,
  • I consistently get this error when scp plugin tries to upload: {quote} Recording fingerprints Sending e-mails to: <me> [SCP] Connecting to <hostname> ERROR: Failed to upload files com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:473) at com.jcraft.jsch.Session.connect(Session.java:145) at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:149) at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:106) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1296) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) Finished: UNSTABLE {quote} This only happens when uploading to a host that's behind a firewall. It can succesfully upload to a host on the same network as the Hudson master and slave. I can manually, using "system" scp, upload files to the host through the firewall with no problems. The "auth.log" file on the remote host is not touched by Hudson's attempts to upload, indicating that it's not the host itself that denies access.
    via by torbent,
  • Jenkins users - SCP plugin
    via by Unknown author,
    • com.jcraft.jsch.JSchException: Auth fail at com.jcraft.jsch.Session.connect(Session.java:473) at com.jcraft.jsch.Session.connect(Session.java:145) at be.certipost.hudson.plugin.SCPSite.createSession(SCPSite.java:149) at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:106)

    Users with the same issue

    Unknown visitor1 times, last one,
    jf-ast
    jf-ast6 times, last one,
    jstrayer
    jstrayer3 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    97 more bugmates