[rancid] Re: 'out of band' access script changes?

Ed Ravin eravin at panix.com
Sun Nov 19 05:26:51 UTC 2006

On Fri, Nov 17, 2006 at 11:55:14AM -0500, Sherrill, Justin wrote:
> I tried applying the patch that Ed Ravin posted:
> http://www.shrubbery.net/pipermail/rancid-discuss/2006-May/001490.html
> And trying it as mentioned here, to reach a device on a separate
> network:
> http://www.shrubbery.net/pipermail/rancid-discuss/2006-June/001551.html
> (in .clogin)
> add method   {usercmd}
> add usercmd   {clogin} {-c} {telnet}
> {}
> (at the command line)
> $ ./bin/clogin -c 'show version'
> spawn clogin -c telnet
> Error: unknown connection method: usercmd

You didn't make any mistakes with the patches.  It's your cloginrc - you
are using the same router IP ( for the first and second hop.
clogin thinks the way to get to is to first log into and then telnet to, which makes no sense.
Since you're calling the unpatched clogin on the second hop, it sees the
"usercmd" stuff defined for and aborts.

You probably wanted to say that the route to is via logging
into and then issuing the telnet command, like this:

  add method  {usercmd}
  add usercmd  {clogin} {-noenable} {-c} {telnet}

  add method  {telnet}
  add password  {xxx} {yyy}

The mistake would have been obvious if you had called the patched clogin in
the "usercmd" - it would have understood "usercmd" and started a recursive
infinite loop of clogins.

Let me know if you run into any more trouble with the patch.

	-- Ed

More information about the Rancid-discuss mailing list