[rancid] Re: clogin hangs (ssh + cisco + bad password)

Allen Tsang greenlog at gmail.com
Fri Oct 5 01:35:55 UTC 2007


Good catch, Greg.

It'd be nice if rancid had a bugzilla, or at least a wiki, to keep track 
of such bugs and other things, such as all these incremental patches 
that we've seen on this mailing-list for random fixes that haven't made 
it into mainline.

Anyone else want to volunteer ( preferable ;p ), or should I step up to 
the plate?

- Allen Tsang

Gregory Bell wrote:
> Hello,
>
> In my environment, clogin hangs (taking >70% cpu) in the following 
> situation:
>
> - monitored device is running IOS
> - method = ssh
> - bad login password in .cloginrc
>
> Obviously I should try to configure .cloginrc correctly ;-) but typos do 
> occur and the hung process seems undesirable.
>
> In the situation I described, it appears that this 'close' doesn't 
> succeed in killing the ssh process:
>
>     -re "(denied|Sorry)"    {
>                    send_user "\nError: Check your passwd for $router\n"
>                    catch {close}; wait; return 1
>                  }
>
> If I capture the ssh pid and try to kill it this way,
>
>     -re "(denied|Sorry)"    {
>                    send_user "\nError: Check your passwd for $router\n"
>                    catch {exec kill $foo; close}; wait; return 1
>                  }
>
> - ssh dies as expected, but clogin hangs with high CPU nevertheless. 
> This is just blundering around, though; I know nothing about expect.
>
> I'm running FreeBSD 6.2, rancid 2.3.1, expect 5.43.0, OpenSSH_4.7p1.
>
> I've tried using the version of clogin in rancid-2.3.2a7, with the same 
> results.
>
> Here's what I see when I run clogin manually:
>
> rancid at mon ~ clogin c29s-50a-5191a-us24.lbnl.us
> c29s-50a-5191a-us24.lbnl.us
> spawn /usr/local/bin/ssh-441 -c 3des -x -l lblnet 
> c29s-50a-5191a-us24.lbnl.us
> CC
>
> NOTICE TO USERS
>
> <SNIP>
>
> Error: Check your passwd for c29s-50a-5191a-us24.lbnl.us
>
> ###### here clogin hangs, with the expect process consuming > 70% CPU.
>
> Any help would be appreciated.
>
> - Greg
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>   



More information about the Rancid-discuss mailing list