fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] passwordless ssh


From: Jeff Forcier
Subject: Re: [Fab-user] passwordless ssh
Date: Tue, 14 Feb 2012 10:41:53 -0800

Hi,

On Tue, Feb 14, 2012 at 9:20 AM, Periya.Data <address@hidden> wrote:

>     env.key_filename = ['/.ssh/id_rsa.pub']

I'm not familiar with running an SSH client on Windows, but are you
100% sure you want that initial forward slash ('/')? On most
filesystems that would look on the root of your system drive for a
folder named ".ssh". Normally what you want is the folder in your home
directory named ".ssh". (I also have no idea how Windows handles file
paths these days -- you might need a fully Windows-ified path with
backslashes and so forth.)

Also, if it *is* in your home directory, the SSH lib should be picking
up the key automatically, though again I don't know if that works 100%
on Windows or not.


Another possibility is a bug that crops up in our ability to detect
SSH's need for passwords vs passphrases, which can result in the wrong
prompt text -- assuming you put a passphrase on your new SSH key, you
should try entering that passphrase at the "password" prompt to see if
it works.


To find out if your key is being picked up correctly, you can import
the logging module near the top of your fabfile.py to get some lower
level SSH log output sent to your terminal, which should include
mention of the keys it's loading/trying:

    import logging
    logging.basicConfig(level=logging.DEBUG)

This will spit out a moderate amount of stuff among Fabric's output,
but the important thing is that you should find a line like this (the
hash string will differ):

    DEBUG:ssh.transport:Trying key a5f9cbf61e3f65f8a26fb94764ff1fea
from /path/to/your/key/file
    DEBUG:ssh.transport:userauth is OK
    INFO:ssh.transport:Authentication (publickey) successful!

If your key is passphrased, this will show up *after* the prompt for
the password/passphrase (and therefore after you type it in and hit
Enter :))


Hope some of that helps -- again Windows is not our primary dev
platform so you may need to wait and see if other users have some tips
for you or can confirm whether that setup works for them.

Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]