My jenkins slave node is offline. The log is as follows:
[06/11/15 09:02:52] [SSH] Opening SSH connection to <ip>.
ERROR: Server rejected the 1 private key(s) for jenkins (credentialId:d7a17c00-1300-4cf3-8cf5-810b3297ebc6/method:publickey)
[06/11/15 09:02:52] [SSH] Authentication failed.
hudson.AbortException: Authentication failed.
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1178)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[06/11/15 09:02:52] Launch failed - cleaning up connection
[06/11/15 09:02:52] [SSH] Connection closed.
I have verified below:
- Authorized_keys file at /var/lib/jenkins-slave/.ssh has correct public key of master.
- Authorized_keys file at /var/lib/jenkins/.ssh has correct public key of master.
- Master has its private and public key files at /var/lib/jenkins/.ssh folder and also at ~/.ssh folder.
I also tried "ssh -i .ssh/id_rsa -l jenkins ” from master machine but it is asking for password. Looks like it is not identifying slave machine.
There is known_hosts file in .ssh folder of both master and slave machine. What data goes in there?
How to resolve the issue?