sftp login without password

David 71david at libero.it
Tue Oct 6 08:40:42 CEST 2009


I am trying to get a login using rsa_key with python.
I have successfully installed paramiko and followed this tutorial:
http://commandline.org.uk/python/sftp-python/

If I use the password 

transport.connect(username = username, password = password)

I get a successful login but, I use the SSH key instead of the password,

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

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

Thanks in advance.
David.



More information about the Python-list mailing list