I am trying to add a Debian GNU/Linux 8 slave node to an already existing Jenkins CI-system (configured by a colleague of mine that has in the meanwhile left our company). Unfortunately, my new agent won’t launch as it cannot launch the agent process on the new slave node. There seems something wrong with the SSH connection from the master to the slave. This is the error that I get:
SSHLauncher{host='10.2.2.41', port=22, credentialsId='1ace657c-17a6-4880-9b9e-82fd7aa9d393', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
[01/10/22 09:15:38] [SSH] Opening SSH connection to 10.2.2.41:22.
[01/10/22 09:15:38] [SSH] SSH host key matches key seen previously for this host. Connection will be allowed.
ERROR: Server rejected the 1 private key(s) for jenkins (credentialId:1ace657c-17a6-4880-9b9e-82fd7aa9d393/method:publickey)
[01/10/22 09:15:38] [SSH] Authentication failed.
Authentication failed.
[01/10/22 09:15:38] Launch failed - cleaning up connection
[01/10/22 09:15:38] [SSH] Connection closed.
I can SSH from the Master to the slave using a password:
barvan@s-ebl-jnks01-15:~$ ssh jenkins@10.2.2.41
jenkins@10.2.2.41's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jan 10 09:25:45 2022 from 10.2.2.38
jenkins@s-be-jnks07-21:~$
but it is not clear to me how I have to configure the credentials on the Jenkins Master. I see that my colleague had already setup the following, which works for another Debian GNU/Linux 9 slave node that is up and running:
The ID for the ‘SSH login from master to slaves based on private key’ matches with the one I see in my log message:
SSHLauncher{host='10.2.2.41', port=22, credentialsId='1ace657c-17a6-4880-9b9e-82fd7aa9d393', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
but for some reason this credential fails for the Debian GNU/Linux 8 host that I’m trying to setup.
What am I overlooking?