title: Invalid private key when opening SSH tunnel with JSch
body: <p>With <a href="http://www.jcraft.com/jsch/" rel="nofollow noreferrer">JSch</a> I'm calling <a href="https://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/JSch.html#addIdentity(java.lang.String)" rel="nofollow noreferrer"><code>addIdentity()</code></a> to add a private key and <a href="https://epaul.github.io/jsch-documentation/javadoc/com/jcraft/jsch/JSch.html#getSession(java.lang.String,%20java.lang.String,%20int)" rel="nofollow noreferrer"><code>getSession()</code></a> to open an SSH tunnel.</p>
  <p>When running this code locally on my Windows machine the opening of the tunnel is working.</p>
  <p>However when running that same code with the same private key on our CI the following error occurs:</p>
  <pre class="lang-none prettyprint-override"><code>2016-12-07 01:01:32 ERROR SSHConnector:25 - invalid privatekey: [B@4bb4de6a
  com.jcraft.jsch.JSchException: invalid privatekey: [B@4bb4de6a
      at com.jcraft.jsch.KeyPair.load(KeyPair.java:747)
      at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
      at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
      at com.jcraft.jsch.JSch.addIdentity(JSch.java:408)
      at com.jcraft.jsch.JSch.addIdentity(JSch.java:389)
  </code></pre>
  <p>The private key looks something like this:</p>
  <pre class="lang-none prettyprint-override"><code>PuTTY-User-Key-File-2: ssh-rsa
  Encryption: none
  Comment: imported-openssh-key
  Public-Lines: 6
  XXXXXXXXXXXXXXXXXXX
  Private-Lines: 14
  XXXXXXXXXXXXXXXXXX
  Private-MAC: XXXXXXXXXXXXXXXX
  </code></pre>
  <p>What could be the error here?</p>