Publish over SSH, Message "invalid privatekey:"
With quite recent (June-July 2020) installations of Jenkins and OpenSSH, I have the following error message when using the "Deploy overs SSH" Jenkins plug-in and publishing artifacts to the target overs SSH:
jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: [B@d8d395a]
This problem seems to be referenced here:
https://issues.jenkins-ci.org/browse/JENKINS-57495
Just regenerate a key with the right parameters
To solve it:
ssh-keygen -t rsa -b 4096
Or
ssh-keygen -t rsa -b 4096 -m PEM