fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Need debugging advice for host key error


From: Waldbieser, Carl
Subject: Re: [Fab-user] Need debugging advice for host key error
Date: Wed, 10 Dec 2014 13:22:32 -0500 (EST)

I suppose I should note the versions I am using:

Fabric==1.10.0
paramiko==1.15.1
pycrypto==2.6.1

Thanks,
Carl

----- Original Message -----
From: "Carl Waldbieser" <address@hidden>
To: "fab-user" <address@hidden>
Sent: Wednesday, December 10, 2014 1:20:01 PM
Subject: Need debugging advice for host key error


Use fabric to retrieve a bunch of files from a set of hosts each day.
However, one host started giving me the following error:

  Fatal error: Host key for $MYHOST did not match pre-existing key! Server's 
key was changed recently, or possible man-in-the-middle attack.
  Underlying exception:
      ('$MYHOST', <paramiko.rsakey.RSAKey object at 0x13e36d0>, 
<paramiko.rsakey.RSAKey object at 0x13e5490>)

(I changed the actual host name to $MYHOST).

I thought an admin had just re-IP'd the host.  But I could ssh to it without a 
warning-- how strange.
I removed the entry from my known_hosts file anyway.  I verified I could shell 
in.  Then I ran fabric and got the same result.
I can get the result by executing something as simple as:

  $ fab -H "$MYHOST" -- ls

The following short paramiko script seems to work, though:

  #! /usr/bin/env python

  import paramiko.client

  c = paramiko.client.SSHClient()
  c.load_system_host_keys()
  c.connect("ldap6")
  t = c.exec_command("ls")
  print t[1].read()
  c.close()

So I am not exactly sure where to look next.  Has anyone run into this puzzling 
behavior?

Thanks,
Carl Waldbieser
ITS System Programmer
Lafayette College




reply via email to

[Prev in Thread] Current Thread [Next in Thread]