trigger/trigger — pull request #198 by scottp-dpaw (2014-09-25 05:15:38+00:00)
Title: Fix hanging SSH connections to Cisco equipment

I've been asked by my employer to build a configuration management workflow using Trigger. Our network has around 60 active remote sites, with mostly Cisco switches and routers, and Trigger has worked pretty well for us so far.

The only irritant is that the SSH connections sometimes hang indefinitely without connecting. For most bits of equipment it's a roughly 10% chance, but today I found a router which has about 95% repeatability. So after some state-of-the-art asynchronous debugging (aka. injecting a lot of stack traces and crying), I found out that it was a Conch problem: the Cisco SSH server needs to have sent the first message before the client bombards it with Kex information (as per http://twistedmatrix.com/pipermail/twisted-python/2009-September/020352.html), or else it hangs.

Seeing as it's been 5 years and neither Cisco or Twisted seem to have fixed this, I've made a patch to fix this in TriggerSSHTransport.