将Brocade交换机添加到Rancid时,出现“flogin错误:错误:TIMEOUT到达”

我已经在我的Ubuntu 14.04系统上设置了Rancid,除了所有型号为'foundry'(Brocade)的设备外,其他设备都可以正常工作。 每个小时一个cron作业都会以rancid用户身份执行rancid-run。 我testing了两个flogin作为clogin二进制login脚本。

flogin

这是我在每个日志中看到的:

<switch>: End of run not found 0 || 0 <switch> flogin error: Error: TIMEOUT reached <switch>: missed cmd(s): show version,show flash,show module,write term,show running-config,show chassis <switch>: End of run not found 

我的.clogin文件似乎很好:

 [email protected]:~$ cat /home/rancid/.cloginrc add autoenable * 1 add method * ssh add user * rancid add password * Jg278edd.fisd%1y 

正常的方式SSH到交换机工作正常。 但手动运行flogin脚本给了我这个:

 [email protected]:/var/lib/rancid/bin$ ./flogin -c 'show version' <switch> s0.nikhef.nl spawn ssh -c 3des -x -l rancid s0.nikhef.nl [email protected]'s password: [email protected]> Error: TIMEOUT reached 

大约需要10秒钟的时间才能login,看起来它不会执行我在-c标志后指定的命令。 经过10-20秒后,它达到Rancid的TIMEOUT值。

clogin

这个脚本工作正常…(但它不去执行模式,它忽略了autoenable 1)..

 [email protected]:/var/lib/rancid/bin$ ./clogin -c 'show version' <switch> <switch> spawn ssh -c 3des -x -l rancid <switch> rancid@<switch>'s password: SSH@<switch>> SSH@<switch>>terminal length 0 Invalid input -> terminal length 0 Type ? for a list SSH@<switch>>terminal width 132 Invalid input -> terminal width 132 Type ? for a list SSH@<switch>>show version SW: Version 04.2.00b Copyright (c) 1996-2010 Brocade Communications Systems, ... SSH@<switch>>exitConnection to <switch> closed by remote host. Connection to <switch> closed. 

所以我想,为什么不用flogin的代码replaceclogin的代码,一切都很好,对不对? 手动testing证实,但做一个rancid运行没有得到configuration,但只是在日志中显示:

 <switch>: End of run not found 0 || 0 <switch>: missed cmd(s): show chassis,show running-config,write term,show flash,show version,show module <switch>: End of run not found 

什么是debugging?

似乎代工设备的.cloginrc文件的autoenable / no enable部分被忽略。 我解决了我的问题,让用户自动进入特权执行模式:

 SSH@<switch>(config)#aaa authentication login privilege-mode 

再次执行rancid-run后,我能够成功地获得所有交换机的configuration。