Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins exception

We use SSH Tectia for our SSH connectivity. In my Jenkins job, i have provided the userid (destination) and the private keyfile (absolute path in the Source box). When i try to test the configuration it fails with the below exception

Failed to connect or change directory

jenkins.plugins.publish_over.BapPublisherException: Failed to connect session for config [SomeName]. Message [Auth fail]

But the same connection id works through command prompt and i can see the keyfile is the same that i have provided.

like image 628
user3815806 Avatar asked Jul 10 '26 05:07

user3815806


1 Answers

You did not tell what kind of SSH operation you are doing in Jenkins. However, most uses of SSH in Jenkins do not require calling the external SSH client (the "ssh" command). Jenkins has a built-in java implementation of the SSH protocol that it uses for most things involving SSH.

The private key file for the Jenkins SSH client functionality needs to be in the OpenSSH format. If my memory serves, the Tectia SSH uses a different key format. You should be able to convert the key for Jenkins using the ssh-keygen tool. See the man page of the tool.

like image 113
sti Avatar answered Jul 13 '26 07:07

sti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!