title: How to ssh connect through Python Paramiko with ppk public key
body: <p>I'm using <a href="http://www.lag.net/paramiko/" rel="nofollow noreferrer">Paramiko</a> to connect through SSH to a server.</p>
  <p>Basic authentication works well, but I can't understand how to connect with public key.</p>
  <p>When I connect with PuTTY, the server tell me this:</p>
  <pre class="lang-none prettyprint-override"><code>Using username &quot;root&quot;.
  Authenticating with public key &quot;rsa-key@ddddd.com&quot;
  Passphrase for key &quot;rsa-key@ddddd.com&quot;: [i've inserted the passphrase here]
  Last login: Mon Dec  5 09:25:18 2011 from ...
  </code></pre>
  <p>I connect to it with this ppk file:</p>
  <pre class="lang-none prettyprint-override"><code>PuTTY-User-Key-File-2: ssh-rsa
  Encryption: aes256-cbc
  Comment: rsa-key@dddd.com
  Public-Lines: 4
  [4 lines key]
  Private-Lines: 8
  [8 lines key]
  Private-MAC: [hash]
  </code></pre>
  <p>With basic auth the error I get (from the log) is:</p>
  <pre class="lang-none prettyprint-override"><code>DEB [20111205-09:48:44.328] thr=1   paramiko.transport: userauth is OK
  DEB [20111205-09:48:44.927] thr=1   paramiko.transport: Authentication type (password) not permitted.
  DEB [20111205-09:48:44.927] thr=1   paramiko.transport: Allowed methods: ['publickey', 'gssapi-with-mic']
  </code></pre>
  <p>I've tried to include that ppk file and set to <code>auth_public_key</code>, but didn't work.</p>
  <p>Can you help me?</p>