2

I am stuck to configure publish over ssh in jenkins.

Jenkins container to ansible container in CLI I am able to do SSH via private key, but the same private key when I am using on publish over ssh it does not work.

jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [ansible]. Message [USERAUTH fail]]

burnsi
  • 6,194
  • 13
  • 17
  • 27
  • Container Logs .. at java.base/java.lang.Thread.run(Thread.java:829) 2022-07-02 19:28:33.607+0000 [id=18] WARNING j.p.p.BapSshHostConfiguration#connect: Failed to connect session for config [ansible]. Message [Auth fail] com.jcraft.jsch.JSchException: Auth fail – Md. Nasir Uddin Jul 02 '22 at 19:31

1 Answers1

4

I solved this problem yesterday morning. In the ssh configuration file I added two lines, now working perfectly.

PubkeyAuthentication yes
PubkeyAcceptedKeyTypes=+ssh-rsa
Stefan
  • 576
  • 7
  • 27