rachit2501
rachit2501

Reputation: 55

Cannot ssh from master to slave node in Jenkins 2.235

I am able to ssh into the node machine via terminal, using ssh [email protected]. But when I try to connect a node using Jenkins, here using Jenkins GUI, I am getting the following error message. I searched for this and it was an old issue with some jenkins 1.x.x version. Am I doing something wrong with Jenkins setup? Or is a similar bug in the latest version of Jenkins too?.

SSHLauncher{host='192.168.50.2', port=22, credentialsId='3722a835-e9b3-4030-a13f-d5911bef2524', jvmOptions='', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=60, maxNumRetries=10, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
[08/27/20 20:20:44] [SSH] Opening SSH connection to 192.168.50.2:22.
Searching for 192.168.50.2 in /var/lib/jenkins/.ssh/known_hosts
Searching for 192.168.50.2:22 in /var/lib/jenkins/.ssh/known_hosts
[08/27/20 20:20:44] [SSH] SSH host key matches key in Known Hosts file. Connection will be allowed.
[08/27/20 20:20:44] [SSH] Authentication failed.
Authentication failed.
[08/27/20 20:20:44] Launch failed - cleaning up connection
[08/27/20 20:20:44] [SSH] Connection closed.

Upvotes: 1

Views: 786

Answers (1)

VonC
VonC

Reputation: 1329262

credentialsId='3722a835-e9b3-4030-a13f-d5911bef2524' means SSH (through JSch, java library for SSH2 access) will used a specific credential.

That credential can be a password, or a SSH key.
But in any case, it does not seems to be the right credential.

Upvotes: 1

Related Questions