views:

62

answers:

1

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).

+3  A: 

Adding the following to your fabfile.py should work:

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

See the fabric docs.

sdolan
looks great but doesn't work. I still get prompted for the password!
Tal Weiss
-i doesn't work either.
Tal Weiss
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
Awesome, glad I could help. Totally forgot about that OpenSSH export step (It's been a while since I used windows + putty).
sdolan