SSH Key authentication failing when connecting Mac Hudson slave to Linux master

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SSH Key authentication failing when connecting Mac Hudson slave to Linux master

Matt Bilson
Hi everyone,

I'm having a problem connect a mac slave to an Ubuntu master using an
SSH key.

Firstly, I posted on Stack Overflow :
http://stackoverflow.com/questions/4715393/ssh-key-authentication-failing-when-connecting-mac-hudson-slave-to-linux-master
.
But a summary is that connecting the master to the slave using an ssh
password works, however if I remove the password, and add the location
of my key file, it fails to connect.

And the logs seem to indicate that it's still trying to authenticate
using a password, rather than a key :
   [01/20/11 03:49:31] [SSH] Opening SSH connection to
192.168.1.113:22.
   [01/20/11 03:49:32] [SSH] Authenticating as mattbilson/******.
   java.io.IOException: Password authentication failed.
      ... etc ...

I can ssh using the command line from the master to the slave
completely fine, and have tested this on 2 different Macs with 2
different Ubuntu VMs. Experiencing the same results on both.
Connecting using an ssh password is ok, but I'd really like to get
this working using a key.

In my sshd_config file on the mac slave I have :

   RSAAuthentication yes
   PubkeyAuthentication yes
   AuthorizedKeysFile      .ssh/authorized_keys
   #PasswordAuthentication yes

Which I thought should allow this.

Is there something I'm missing in the Hudson config, or in the ssh
config on the slave?

Thanks,
Matt
Reply | Threaded
Open this post in threaded view
|

Re: SSH Key authentication failing when connecting Mac Hudson slave to Linux master

Matt Bilson
Ok, don't panic! I've fixed it :)
It was a permissions issue between the hudson user, and the key file
of the user I was using.

More info here :
http://stackoverflow.com/questions/4715393/ssh-key-authentication-failing-when-connecting-mac-hudson-slave-to-linux-master

On Jan 20, 11:54 am, Matt Bilson <[hidden email]> wrote:

> Hi everyone,
>
> I'm having a problem connect a mac slave to an Ubuntu master using an
> SSH key.
>
> Firstly, I posted on Stack Overflow :http://stackoverflow.com/questions/4715393/ssh-key-authentication-fai...
> .
> But a summary is that connecting the master to the slave using an ssh
> password works, however if I remove the password, and add the location
> of my key file, it fails to connect.
>
> And the logs seem to indicate that it's still trying to authenticate
> using a password, rather than a key :
>    [01/20/11 03:49:31] [SSH] Opening SSH connection to
> 192.168.1.113:22.
>    [01/20/11 03:49:32] [SSH] Authenticating as mattbilson/******.
>    java.io.IOException: Password authentication failed.
>       ... etc ...
>
> I can ssh using the command line from the master to the slave
> completely fine, and have tested this on 2 different Macs with 2
> different Ubuntu VMs. Experiencing the same results on both.
> Connecting using an ssh password is ok, but I'd really like to get
> this working using a key.
>
> In my sshd_config file on the mac slave I have :
>
>    RSAAuthentication yes
>    PubkeyAuthentication yes
>    AuthorizedKeysFile      .ssh/authorized_keys
>    #PasswordAuthentication yes
>
> Which I thought should allow this.
>
> Is there something I'm missing in the Hudson config, or in the ssh
> config on the slave?
>
> Thanks,
> Matt