[paramiko] attribute error
Robey Pointer
robey at lag.net
Fri Dec 15 12:38:46 PST 2006
On 10 Dec 2006, at 20:23, mike wrote:
> hi
>
> I am connecting to a SFTP server using only public key authentication
>
> here is my code:
> ....
> path = os.path.join("somepath", '.ssh', 'id_rsa_a')
> try:
> t = paramiko.Transport((svr, PORT))
> t.connect(hostkey=None, username='', password=None,pkey=path)
This is your problem ^
You need to create a key object from the ssh key file:
key = paramiko.RSAKey.from_private_key_file(path)
and pass that key object as the 'pkey' parameter to Transport.connect().
robey
More information about the paramiko
mailing list