[paramiko] Noob question
james bardin
jbardin at bu.edu
Thu Mar 12 12:44:54 PDT 2009
On Thu, Mar 12, 2009 at 2:10 PM, Crooks, Sam <Sam.Crooks at experian.com> wrote:
> there is a function to autoadd keys..
>
> After creating the SSHClient instance and before connect():
>
>
> s.set_missing_host_key_policy(paramiko.AutoAddPolicy())
>
Yes, but auto adding defeats the purpose of checking the host keys
(unless that's what you're going for)
> -----Original Message-----
> From: paramiko-bounces at lag.net [mailto:paramiko-bounces at lag.net] On
> Behalf Of Alejandro Bednarik
>
> I am trying to do a simple script to execute a remote command using
> python with paramiko module. the problem seems the way gentoo and fedora
> store RSA key fingerprint, in the known_host file i see something like
> this
>
> hostname,192.168.1.4 ssh-rsa
>
> while in ubuntu i see
>
> |1|rDQW7dhZjcQ4UdfgyapD8U+Ggfgf=|kgsgs5R0DLFVzLwbDGurhHWIXpo= ssh-rsa
>
The hashed hostname shouldn't be the problem, unless you're using a
very old version of paramiko (added in 1.5.3)
Can you use ssh from the command line to verify that your have the
remote host's key in your known_host file?
And, I assume your script is exiting on the "Host key could not be
verified: " line.
If you want to turn hashing off for easier debugging, set
"HashKnownHosts no" in your ssh config.
-jim
More information about the paramiko
mailing list