title: SSH Key authentication failing when connecting Mac Hudson slave to Linux master
body: <p>Ok, so I have Hudson (v1.393) running in an Ubuntu VM and everything's working fine.
  However I'm trying to add a Mac slave to the Ubuntu master and I've run in to a few problems.</p>
  
  <p>I have set up SSH keys so that from the command line, the Ubuntu VM can ssh using the key into a user called hudson on the Mac.</p>
  
  <p>In the Hudson slave configuration, I have "Launch slave agents on Unix machines via SSH" selected and have entered the host IP, username of the user on the slave and the location of my private key file on the master (which has been added to the authorised keys file on the slave).</p>
  
  <p>However, the master fails to connect to the slave.
  Looking at the log (below), it's trying to authenticate using a password.</p>
  
  <p>Is this a fall back for a failed key based SSH attempt?<br>
  Is Hudson only trying to authenticate using a password, and I need to change something else to get it to use the key file which is defined in the configuration?<br>
  Is it just not possible to launch slave agents via ssh on a mac? (I know the name of this type of slave launch method explicity states Unix, but I was thinking (read: hoping) that it would work with OS X too)</p>
  
  <p><strong>Log</strong>  </p>
  
  <pre><code>[01/14/11 10:38:07] [SSH] Opening SSH connection to 10.0.1.188:22.
  [01/14/11 10:38:07] [SSH] Authenticating as hudson/******.
  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:184)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:636)
  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
  [01/14/11 10:38:07] [SSH] Connection closed.
  </code></pre>
  
  <p>If anyone has managed to conquer this type of set up before, or has any tips or ideas, I'd be very grateful!
  Thanks</p>