Paramiko SFTP autologon using id_dsa.pub
Michele Hjorleifsson
mhjorleifsson at gmail.com
Thu Feb 14 00:19:45 EST 2008
wow been going nuts here after cutting and pasting to get a working test
so i ran demo.py ... and its not me.. i changed the hostname for
obvious reasongs, the id_dsa file does exist. i can sftp from bash no
problem. there is NO password on the key
Any ideas ? here is what i get.
Hostname: xxx.example.com
*** Host key OK.
Username [root]: isoaccpc2
Auth by (p)assword, (r)sa key, or (d)ss key? [p] d
DSS key [/root/.ssh/id_dsa]:
*** Caught exception: paramiko.SSHException: Channel closed.
Traceback (most recent call last):
File "demo.py", line 163, in ?
chan.get_pty()
File "build/bdist.linux-i686/egg/paramiko/channel.py", line 156, in
get_pty
File "build/bdist.linux-i686/egg/paramiko/channel.py", line 1062,
in _wait_for_event
SSHException: Channel closed.
On Feb 7, 2008, at Thursday 7, 12:25 , Todd Whiteman wrote:
> Mike Hjorleifsson wrote:
>> I wrote a lil module using paramiko's module to send a file via
>> sftp.. it works great using the username and password.
>> I would prefer to use id_dsa.pub to have an autologon and not save
>> the
>> password anywhere on the disk.. I cant find a good example of this.
>> Can anyone help ?
>
> Hi Mike,
>
> If you download the Paramiko zip archive:
> http://www.lag.net/paramiko/download/paramiko-1.7.2.zip
>
> You can find examples of loading and using public/private keys for
> automated logins in the code under the "demos" sub folder.
>
> Cheers,
> Todd
More information about the Python-list
mailing list