Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39987

Unable to run the Build job on a slave node that has SSH key authenticaton enabled


    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: ssh-agent-plugin
    • Labels:
    • Environment:
      This is Jenkins ver. 2.19.1 which is installed on a CentOS 6.6 server. The slave node is a CentOS 7 server.
    • Similar Issues:


      1. Jenkins can connect to this slave node when I setup 'admin' user with adding the private key.

      [12/01/16 09:00:44] [SSH] Opening SSH connection to
      [12/01/16 09:00:44] [SSH] Authentication successful.
      [12/01/16 09:00:44] [SSH] The remote users environment is:
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Slave.jar version: 2.62
      This is a Unix agent
      Evacuated stdout
      Agent successfully connected and online

      2. To create a Build job, in the Manage Jenkins --> Configure System --> SSH remote hosts, I add in the 'admin' user and hostname. After that I use this 'admin' user and hostname to set up connection to the slave node in the Build Job. In this setup user and hostname section, it doesn't have an option to add in the private key for the 'admin' user. So it shows "Authentication fail" when I run the Build job using "Execute shell script on remote host using ssh".

      3. I try to use the SSH Agent Plugin and follow steps in the Jenkins wiki page to install the "Apache Tomcat Native libraries" on the slave node:

      After I install the Apache Tomcat Native libraries on the slave node, it still shows "Authentication fail".

      [ssh-agent] Looking for ssh-agent implementation...
      [ssh-agent] Java/JNR ssh-agent
      [ssh-agent] Registered BouncyCastle on the remote agent
      [ssh-agent] Started.
      [SSH] Exception:Auth fail
      com.jcraft.jsch.JSchException: Auth fail
      at com.jcraft.jsch.Session.connect(Session.java:452)
      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:534)
      at hudson.model.Run.execute(Run.java:1720)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:404)
      Build step 'Execute shell script on remote host using ssh' marked build as failure

      Please give your advice,
      Thank you




            • Assignee:
              jimmyvo Jimmy
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: