title: Jenkins publish over ssh shows error "jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key."
body: <p>For connecting jenkins with remote server with ssh I installed publish over SSH plugin in jenkins. But after configuration it shows error as jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: [B@7934add]</p>
  
  <p>Initially I logged as jenkins user in server as "sudo su jenkins"
  After this I typed "ssh-keygen" and give the passphrase value and given the path of key in jenkins configuration.</p>
  
  <p>my passphrase is the value which I given while creating ssh-keygen</p>
  
  <p>my passphrase/password is same value which I given while creating ssh-keygen. I don't am I correct with this point</p>
  
  <p><a href="https://i.stack.imgur.com/TXTZW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TXTZW.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/puULJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/puULJ.png" alt="enter image description here"></a></p>
  
  <p>But all my configuration when I click test configuration button it shows "</p>
  
  <pre><code>Failed to connect or change directory
  
  jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: [B@3085b39b]"
  </code></pre>