• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ssh-plugin
    • None

      SSH plugin throws auth cancel with simplest configuration.

      On my jenkins server I can ssh to target machine using keys without passphrase.

      When I add SSH location using SSH Plugin this consistently fails with message below.

      Started by user Onno van der Straaten
      Building in workspace ..
      repository
      executing script:
      
      ls
      [SSH] Exception:Auth cancel
      com.jcraft.jsch.JSchException: Auth cancel
      	at com.jcraft.jsch.Session.connect(Session.java:451)
      	at com.jcraft.jsch.Session.connect(Session.java:150)
      	at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:118)
      	at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:128)
      	at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:593)
      	at hudson.model.Run.execute(Run.java:1568)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:237)
      Build step 'Execute shell script on remote host using ssh' marked build as failure
      Finished: FAILURE

      On target machine /var/log/messages shows each time

      Apr  3 08:26:13 mymachine sshd[12009]: Received disconnect from (ip): 3: com.jcraft.jsch.JSchException: Auth cancel

          [JENKINS-17440] SSH Plugin throws auth cancel

          jpollak added a comment -

          I am seeing the same issue. Is it a configuration issue?

          jpollak added a comment - I am seeing the same issue. Is it a configuration issue?

          I am experiencing same issue. How come no updates on this Major issue.

          Dev Kanaginhal added a comment - I am experiencing same issue. How come no updates on this Major issue.

          Jared Hodge added a comment - - edited

          I was also seeing a similar issue. Watching /var/log/secure on the target system indicated that it was a bad password. I figured out that when I changed the password I updated an entry in "credentials" but didn't update the proper entry in the general configuration. It's a bit confusing having ssh sites NOT under credentials. Also it would be good if there was a better error message from this plugin (like "password failed" or something like that).

          Jared Hodge added a comment - - edited I was also seeing a similar issue. Watching /var/log/secure on the target system indicated that it was a bad password. I figured out that when I changed the password I updated an entry in "credentials" but didn't update the proper entry in the general configuration. It's a bit confusing having ssh sites NOT under credentials. Also it would be good if there was a better error message from this plugin (like "password failed" or something like that).

          Paul P added a comment -

          Hi Team,
          Could you please update us on this issue.seems like its an known/common issue.

          Paul P added a comment - Hi Team, Could you please update us on this issue.seems like its an known/common issue.

          Daniel Beck added a comment -

          What happens when you run sshd on the server, with debug logging, in the foreground? It should tell you what's going on in more detail.

          seems like its an known/common issue.

          One of the most used plugins for Jenkins has five people experiencing this problem (going by watchers) in two years indicates it's not a common issue.

          Daniel Beck added a comment - What happens when you run sshd on the server, with debug logging, in the foreground? It should tell you what's going on in more detail. seems like its an known/common issue. One of the most used plugins for Jenkins has five people experiencing this problem (going by watchers) in two years indicates it's not a common issue.

          I am having the same issue.

          My network topology is as follows.

          I am using IP 10.0.21.xxx for our development and staging server (not accessible from outside), and 192.168.1.xxx for production servers ("public" facing site).

          I am able to connect to all my 10.0.21.xxx IP, but not any single 192.168.1xxx IP.

          Is this any progress on this?

          Laurentius Purba added a comment - I am having the same issue. My network topology is as follows. I am using IP 10.0.21.xxx for our development and staging server (not accessible from outside), and 192.168.1.xxx for production servers ("public" facing site). I am able to connect to all my 10.0.21.xxx IP, but not any single 192.168.1xxx IP. Is this any progress on this?

          Anthony Chan added a comment -

          I am having the same issue, too.

          Is anyone looking into it?

          I hope the following information is helpful for the Jenkins team to analyze the issue

          Jenkins version: 1.617
          SSH plugin version: 2.4

          Jenkins server:
          Jenkins is installed on Red Hat Enterprise Linux Server release 6.6
          ssh version is (from output of ssh -V)
          OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013

          Remote system (let's say machine A)
          OS: Red Hat Enterprise Linux Server release 6.5
          ssh version:
          OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010

          Remote system (let's say machine B)
          OS: SUSE Linux Enterprise Server 11
          ssh version:
          OpenSSH_6.2p2, OpenSSL 0.9.8j-fips 07 Jan 2009

          Observation:
          The SSH plugin works with machine A, but it return the same error with machine B.

          Does the ssh version matter?

          thanks

          --anthony

          Anthony Chan added a comment - I am having the same issue, too. Is anyone looking into it? I hope the following information is helpful for the Jenkins team to analyze the issue Jenkins version: 1.617 SSH plugin version: 2.4 Jenkins server: Jenkins is installed on Red Hat Enterprise Linux Server release 6.6 ssh version is (from output of ssh -V) OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 Remote system (let's say machine A) OS: Red Hat Enterprise Linux Server release 6.5 ssh version: OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 Remote system (let's say machine B) OS: SUSE Linux Enterprise Server 11 ssh version: OpenSSH_6.2p2, OpenSSL 0.9.8j-fips 07 Jan 2009 Observation: The SSH plugin works with machine A, but it return the same error with machine B. Does the ssh version matter? thanks --anthony

          Can confirm this on Jenkins 2.7.2 SSH Plugin 2.4 with the default Jenkins Dockerimage.

          Philipp Moeller added a comment - Can confirm this on Jenkins 2.7.2 SSH Plugin 2.4 with the default Jenkins Dockerimage.

            Unassigned Unassigned
            ostraaten Onno van der Straaten
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: