I am successfully able to connect to remote machine using SSH but when I am launching the agent from Jenkins it throws the following error:
ERROR: Server rejected the 1 private key(s) for user1 (credentialId:xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/method:publickey)
[01/19/17 05:35:15] [SSH] Authentication failed.
hudson.AbortException: Authentication failed.
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1219)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:714)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:709)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[01/19/17 05:35:15] Launch failed - cleaning up connection
[01/19/17 05:35:15] [SSH] Connection closed.
I can establish SSH connection from master machine to the node machine using user1
, however when I am trying to launch the agent using user1
from jenkins it is rejecting the private key. Is there any solution to overcome this issue?
chown -R jenkins /var/lib/jenkins
– Poesy