OK, I made some progress. When inserting *manually* the private key in the 'manage credentials' page, it works. I tried it before, but I didn't add the prefix and suffix of the key.
What's weird to me, is that I have to manually add the private key. When I'm *selecting* the *'From a file on Jenkins master*' and specify the private key file path (/home/avihay/.ssh/id_rsa) the SSH authentication * fails*, and also when I'm choosing the '*From the Jenkins master ~/.ssh*' Also, the credential in the error message aren't the ones that in the private key file, I don't know from where it fetch it. Now it seems that the Java version in the Slave is not updated, but that's a different problem... On Monday, August 5, 2013 7:42:14 PM UTC+3, JonathanRRogers wrote: > > On Monday, August 5, 2013 11:09:33 AM UTC-4, Avihay Eyal wrote: >> >> Hi, I'm trying to setup a build slave, but when failing to connect to it. >> I receive a IOException: Publickey authentication failed. >> >> The setup looks like this: >> >> >> 1. Jenkins Master runs under user 'avihay' in machine A. >> 2. Slave runs on machine B with IP X (no DNS in my setup, so I'm >> using IP), and I'm trying to ssh with the user 'risk' >> 3. I've created ssh keys in machine A, and did "ssh-copy" to user >> 'risk' in machine B, so now I can ssh without password from machine A to >> B >> (checked it). >> 4. I've changed the name of the Jenkins user 'anonymous' to 'avihay' >> via the UI >> 5. I've copied the SSH public key that I created in step 3 to the >> 'SSH Public Key' text box in the user 'avihay' config (in Jenkins UI). >> 6. I created a new node, with the IP of host B, and in the >> credentials the user name is 'risk', and the private key is set to 'From >> Jenkins master ~/.ssh', although I tried the other two options, and they >> didn't work as well >> 7. When I'm pressing the 'Launch slave agent', it fails with the >> following details: >> >> Opening SSH conection to XXX.XX.XX.X (My IP addresss) >> ERROR: Failed to authenticate as risk with credential=3318c.... >> java.io.IOException: Publickey authentication failed >> >> >> BTW, the credentials appearing in the log message are not the credentials >> appearing in the ~/.ssh/id_rsa file, nor in the credentials I inseted in >> bullet 5. >> >> > All I've had to do is to get public key authentication working so that I > can ssh from the Jenkins master host and user to the slave host and user, > then set the host and user name in the Jenkins slave config. Jenkins picked > up the existing SSH config. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
