I can authenticate successfully with putty
on the server with my private key
and passphrase. But when I try to do it with jenkins publish o
Check that the public key is in the .ssh/authorized_keys
file on the target server, even if the target server is the same as the jenkins server. I had what is probably the same problem, and it turned out that I needed this, even though ssh localhost
worked fine.
(Addendum: also check that the jenkins server has the target server in its .ssh/known_hosts
file, as that can affect this as well.)