While connecting through ssh to ansible server from jenkins, its showing:
“error: exception when publishing, exception message [failed to connect and initialize ssh connection. message: [failed to connect session for config [ansible]. message [auth fail]]] build step ‘send build artifacts over ssh’ changed build result to unstable”.
I have already added and copied ssh keys to ansible server and also changed remotelogin in sshd config of ansible server.
Would any help me reach out this??
I would recommend wrapping your ansible stuff using SSH Agent that way you don’t need to copy random ssh keys onto servers in the right directories and stuff, you can just use ssh-agent and jenkins credentials
1 Like