title: Fabric does not use SSH key
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5327465/using-an-ssh-keyfile-with-fabric">Using an SSH keyfile with Fabric</a>  </p>
  </blockquote>
  
  
  
  <p>In my fable</p>
  
  <pre><code>env.ip = 'x.x.x.x' 
  env.hosts = [env.ip] 
  env.user = 'root'
  env.environment = 'production'
  </code></pre>
  
  <p>I have the config like this, but when I trying to execute something using run(command), it prompts me to put the password for root, why?</p>
  
  <p>In my native Terminal.app, I can ssh x.x.x.x without entering the password.</p>
  
  <p>I have enabled logging in the fabfile, and here is the ouput</p>
  
  <pre><code>DEBUG:ssh.transport:starting thread (client mode): 0xaa84dd0L
  INFO:ssh.transport:Connected (version 2.0, client OpenSSH_5.8p1)
  DEBUG:ssh.transport:kex algos:['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] server encrypt:['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'arcfour256', 'arcfour128', 'aes128-cbc', '3des-cbc', 'blowfish-cbc', 'cast128-cbc', 'aes192-cbc', 'aes256-cbc', 'arcfour', 'rijndael-cbc@lysator.liu.se'] client mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'umac-64@openssh.com', 'hmac-ripemd160', 'hmac-ripemd160@openssh.com', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', 'zlib@openssh.com'] server compress:['none', 'zlib@openssh.com'] client lang:[''] server lang:[''] kex follows?False
  DEBUG:ssh.transport:Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
  DEBUG:ssh.transport:using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
  DEBUG:ssh.transport:Switch to new keys ... [x.x.x.x] Login password for 'root':
  </code></pre>