[paramiko] attribute error
mike
mik3l3374 at gmail.com
Sun Dec 10 20:23:19 PST 2006
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)
sftp = paramiko.SFTPClient.from_transport(t)
try:
sftp.put(fil)
except Exception, v:
print v
except:
some other codes........
and here is the error i get at t.connect():
DEB [20061211-12:07:50.238] thr=1 paramiko.transport: using kex
diffie-hellman-group1-sha1; server key type ssh-dss; c
ipher: local 3des-cbc, remote 3des-cbc; mac: local hmac-sha1, remote
hmac-sha1; compression: local none, remote none
DEB [20061211-12:07:52.731] thr=1 paramiko.transport: Switch to new keys
...
DEB [20061211-12:07:52.734] thr=2 paramiko.transport: Attempting
public-key auth...
DEB [20061211-12:07:52.948] thr=1 paramiko.transport: userauth is OK
ERR [20061211-12:07:52.948] thr=1 paramiko.transport: Unknown exception:
'str' object has no attribute 'get_name'
ERR [20061211-12:07:52.950] thr=1 paramiko.transport: Traceback (most
recent call last):
ERR [20061211-12:07:52.950] thr=1 paramiko.transport: File
"/usr/python/lib/python2.4/site-packages/paramiko/transpo
rt.py", line 1369, in run
ERR [20061211-12:07:52.950] thr=1 paramiko.transport: File
"/usr/python/lib/python2.4/site-packages/paramiko/auth_ha
ndler.py", line 203, in _parse_service_accept
ERR [20061211-12:07:52.951] thr=1 paramiko.transport: AttributeError:
'str' object has no attribute 'get_name'
ERR [20061211-12:07:52.951] thr=1 paramiko.transport:
May i know how to resolve this??
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lag.net/pipermail/paramiko/attachments/20061211/ee247647/attachment.htm
More information about the paramiko
mailing list