title: I can manully ssh2 to remote host, but paramiko can not, why?
body: <p>I want use paramiko to ssh2 to a remote host by public-key authentication, I setup the keys like these steps:</p>
  
  <p>On local:</p>
  
  <pre><code>    Local&gt; ssh-keygen
      Generating 1024-bit dsa key pair
      9 o.oOo..oOo.o
      Key generated.
      Passphrase :
      Again :
      Private key saved to /home/local/.ssh2/id_dsa_1024_a
      Public key saved to /home/local/.ssh2/id_dsa_1024_a.pub
  
      Local&gt; cd ~/.ssh2
      Local&gt; echo "IdKey id_dsa_1024_a" &gt; identification
      Local&gt; scp id_dsa_1024.pub remote@remote-host:~/.ssh2/local.pub
  </code></pre>
  
  <p>On remote:</p>
  
  <pre><code>    Remote&gt; ssh-keygen
      ...omit...
      Remote&gt; cd ~/.ssh2
      Remote&gt; echo "Key local.pub" &gt; authorization
  </code></pre>
  
  <p>After things above, I can just use <code>ssh remote@remote-host</code> to login.</p>
  
  <p>However,I failed to use python's paramiko module to login remote-host:</p>
  
  <pre><code>    conn = paramiko.SSHClient()
      conn.set_missing_host_key_policy(paramiko.AutoAddPolicy())
      conn.connect(remote-host, 22, username=remote,password='')
  </code></pre>
  
  <p>Alway error: Authentication failed.</p>
  
  <p>I'm so confused. :(</p>