Thursday, December 15, 2011

jenkins error: java.io.IOException: Authentication method password not supported by the server at this stage

When I tried to add a node to jenkins/hudson using ssh as launch method, the authentication keeps on failing with the below error.


[12/15/11 13:23:12] [SSH] Opening SSH connection to **.**.***.**:22.
[12/15/11 13:23:12] [SSH] Authenticating as build/******.
java.io.IOException: Password authentication failed.
at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:319)
at com.trilead.ssh2.Connection.authenticateWithPassword(Connection.java:314)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:565)
at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:179)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:199)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Authentication method password not supported by the server at this stage.
at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:289)
... 9 more
[12/15/11 13:23:12] [SSH] Connection closed.


The host has SLES OS and I was wondering what's going wrong, even though I gave correct password.

FIX: Change the sshd configuration
   In /etc/sshd_config (or /etc/ssh/sshd_config) file
  # To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
If set to no, Hudson's SSH client won't be able to connect using password authentication. If you comment this line out (which I believe is the OpenSSH default), or set it to yes, then Hudson can connect just fine.


No comments: