sftp login without password
71david at libero.it
Thu Oct 8 20:53:04 CEST 2009
Il Tue, 06 Oct 2009 12:26:34 -0800, Joshua Kugler ha scritto:
> David wrote:
>> transport.connect(username = username, pkey = mykey)
>> I get a "AuthenticationException: Authentication failed." exception.
>> My ~/.ssh/id_rsa is correct because if, at console, I type
>> bagside at bagvapp:~$ sftp bagside at 192.168.92.129
>> Connecting to 192.168.92.129...
>> I get a successful login. How can I get an sftp login without using a
>> password in python?
>> I am using Ubuntu 9.04, python 2.6.2 and paramiko 1.7.5
> What is the contents of 'mykey'? Is it a file object? A string containing
> the contents of ~/.ssh/id_rsa? The Paramiko docs indicate mykey should be a
> subclass of PKey, probably RSAKey.
> So, you'd need to do:
> mykey = RSAKey.from_private_key_file('/path/to/private/key/id_rsa')
> transport.connect(username = username, pkey = mykey)
That's exactly what I did (as clearly explained in the tutorial) but doesn't
> Beyond that, I"m not sure. Of course, I've never used Paramiko before.
Can you suggest an alternative way to connect to an sftp server without
using a passoword in python?
More information about the Python-list