Paramiko SFTP autologon using id_dsa.pub

Mike Hjorleifsson mhjorleifsson at gmail.com
Wed Feb 6 14:03:33 EST 2008


Thanks for the response, is there an example bit of code somewhere i
could digest ?

On Feb 6, 1:35 pm, "Martin v. Löwis" <mar... at v.loewis.de> 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 ?
>
> When you have an ssh-agent running that has the key loaded, paramiko
> will automatically use that. If you don't have an ssh-agent running,
> you have to pass either the pkey or the key_filename argument; the
> former should be a PKey object (either RSAKey or DSSKey).
>
> Regards,
> Martin




More information about the Python-list mailing list