Bug when using SSH on CatOS devices
Michael Lyngbøl
michael at lyngbol.dk
Tue Oct 26 11:33:33 UTC 2004
Hi,
I'm using RANCID 2.3.1 to get config from a bunch of Cisco 6500 running
CatOS 6.4.
Login is via SSH (on FreeBSD 5.3 w/ OpenSSH 3.8.1p1).
cat5rancid has the following code at around line 1062:
TOP: while(<INPUT>) {
tr/\015//d;
if (/> \(enable\) ?exit$/) {
$clean_run=1;
last;
}
where $clean_run would be set to true if the prompt matches 'exit'.
However when using SSH the exit becomes:
Switch> (enable)Connection to switch.foo.bar closed by remote host.
Connection to switch.foo.bar closed.
compared to this using telnet:
Switch> (enable)exit
Connection closed by foreign host.
which will match and set $clean_run to true. Hence $clean_run will
remain false when using SSH, making cat5rancid fail.
A quick hack is to just do '$clean_run = 1' at the end of the while()
loop, but it doesn't fix it for real.
Any ideas?
Thanks,
/Michael
--
Michael Lyngbøl -- michael at lyngbol dot dk
Network Architect, AS3292 TDC, IP·backbone
More information about the Rancid-discuss
mailing list