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

Jenkins CLI unable to read SSH

XMLWordPrintable

    • 2.303.1

      Hello,

        We upgraded from 2.280 to 2.285 and now we are getting the following:

      _[root@~]_ _"/usr/lib/jvm/java-1.8.0/bin/java" -jar jenkins-cli.jar -s http://127.0.0.1:8080 -ssh -user "jenkins_automation" -p 53801 -i jenkins-key.pem who-am-i_
      _Mar 31, 2021 12:50:15 PM io.jenkins.cli.shaded.org.apache.sshd.common.util.security.AbstractSecurityProviderRegistrar getOrCreateProvider_
      _INFO: getOrCreateProvider(EdDSA) created instance of io.jenkins.cli.shaded.net.i2p.crypto.eddsa.EdDSASecurityProvider_
      _Mar 31, 2021 12:50:15 PM io.jenkins.cli.shaded.org.apache.sshd.common.io.DefaultIoServiceFactoryFactory getIoServiceProvider_
      _INFO: No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory_
      _io.jenkins.cli.shaded.org.apache.sshd.common.SshException: No more authentication methods available_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:126)_
       _at io.jenkins.cli.shaded.org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:39)_
       _at io.jenkins.cli.shaded.org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:32)_
       _at hudson.cli.SSHCLI.sshConnection(SSHCLI.java:108)_
       _at hudson.cli.CLI._main(CLI.java:285)_
       _at hudson.cli.CLI.main(CLI.java:96)_
      _Caused by: io.jenkins.cli.shaded.org.apache.sshd.common.SshException: No more authentication methods available_
       _at io.jenkins.cli.shaded.org.apache.sshd.client.session.ClientUserAuthService.tryNext(ClientUserAuthService.java:342)_
       _at io.jenkins.cli.shaded.org.apache.sshd.client.session.ClientUserAuthService.processUserAuth(ClientUserAuthService.java:277)_
       _at io.jenkins.cli.shaded.org.apache.sshd.client.session.ClientUserAuthService.process(ClientUserAuthService.java:224)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:502)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:428)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1463)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:388)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:64)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:358)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:335)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:332)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)_
       _at java.security.AccessController.doPrivileged(Native Method)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)_
       _at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)_
       _at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157)_
       _at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555)_
       _at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277)_
       _at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:429)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:362)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:335)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:332)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)_
       _at java.security.AccessController.doPrivileged(Native Method)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)_
       _at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)_
       _at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157)_
       _at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:555)_
       _at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:277)_
       _at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:298)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session.doReadCycle(Nio2Session.java:429)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:362)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:335)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:332)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)_
       _at java.security.AccessController.doPrivileged(Native Method)_
       _at io.jenkins.cli.shaded.org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)_
       _at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)_
       _at sun.nio.ch.Invoker$2.run(Invoker.java:218)_
       _at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)_
       _at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)_
       _at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)_
       _at java.lang.Thread.run(Thread.java:748)_
      
        The credential are correct as the following works fine:
      
      _[root@~]# ssh -i jenkins-key.pem -p 53801 jenkins_automation@localhost who-am-i_
      _Authenticated as: jenkins_automation_
      _Authorities:_
       _authenticated_
       _system_users_
       _ROLE_SYSTEM_USERS_
      

        I checked the changelog and I can see the following on 2.284: "Update Jenkins CLI to SSHD Core from 1.7.0 to 2.6.0. (pull 5206)". I am not sure if related.

       

        We are suing SSH Credentials Plugin version 1.18.2, SSH server version 3.0.3.

       

        Any suggestion would be welcome.

       

      Thanks

      Andrea

       

       

        

        

       

         

       

            teilo James Nord
            andrea_lai Andrea Lai
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: