7

Relevant question:

I configured Putty to login with private-public keys (no password) using this guide: http://www.codelathe.com/blog/index.php/2009/02/20/ssh-without-password-using-putty/

It works.

Now I want to run Fabric with no password prompt. This does not work and I get prompted for a password. I'm assuming Paramiko (or some other Fabric dependency) does not find the ppk file. Where do I place the private key file and how do I tell fabric / paramiko about it?

Running on Vista, using Python 2.6.5 and latest Fabric (0.91) / Putty (0.60).

Community
  • 1
  • 1
Tal Weiss
  • 8,889
  • 8
  • 54
  • 62

1 Answers1

9

Adding the following to your fabfile.py should work:

env.user = "your_username"
env.key_filename = ["/path/to/keyfile"]

See the fabric docs.

Sam Dolan
  • 31,966
  • 10
  • 88
  • 84
  • looks great but doesn't work. I still get prompted for the password! – Tal Weiss Jul 18 '10 at 21:19
  • 4
    Resolved! I had to export the key to the OpenSSH format in puttygen for it to work. This, with your pointer resolved the issue. Thanks! +1. – Tal Weiss Jul 18 '10 at 21:38
  • 1
    Awesome, glad I could help. Totally forgot about that OpenSSH export step (It's been a while since I used windows + putty). – Sam Dolan Jul 18 '10 at 21:58