[rancid] Can't connect to Enterasys via SSH
Alan McKinnon
alan.mckinnon at gmail.com
Fri Oct 18 11:27:41 UTC 2013
I think you are starting your debugging in the wrong place. You first
need to verify that the correct data is being passed to rivrancid for
processing.
Are you using rivlogin to do the login and fetch data step?
Does this part work correctly when you run it manually?
On 18/10/2013 12:25, Victor Ruiz wrote:
> Hi group;
>
>
>
> I’m new on Rancid software, I need get the configuration of several
> Enterasys boxes. I was use the rivlogin and rivrancid in order to get
> this configuration but I’ve a problem because in the rivlogin I only can
> connect via telnet. I’m making a new script coping the clogin with a
> different name for connect with Enterasys via SSH and work properly but
> when I try get the unique command that I need I have an error with text:
> “missed cmd(s): show config”.
>
>
>
> My commnadtable is:
>
>
>
> @commandtable = (
>
> # {'show system' => 'ShowUptime'},
>
> # {'show version' => 'ShowVersion'},
>
> # {'show system hardware' => 'ShowHardware'},
>
> # {'set length 0' => 'ShowActive'},
>
> {'show config' => 'ShowActive'}
>
> );
>
>
>
> And the routine for Show config is:
>
>
>
> # This routine processes a "system show active"
>
> sub ShowActive {
>
> print STDERR " In ShowActive: $_" if ($debug);
>
>
>
> while (<INPUT>) {
>
> tr/\015//d;
>
>
>
> # Remove leading whitespace and/or line numbers
>
> s/^\s*(\d+\D: )*//;
>
>
>
> # Riverstone/Cabletron doesn't have an "end" line, so
>
> # we need to set $clean_run here
>
> if (/^$prompt/) {
>
> $clean_run = 1;
>
> last;
>
> }
>
>
>
> next if (/Running system configuration/);
>
>
>
> # filter out any RCS/CVS tags to avoid confusing local CVS storage
>
> s/\$(Revision|Id):/ $1:/;
>
>
>
> if (/^(.*hashed-password \S+)/ && $filter_pwds == 2) {
>
> ProcessHistory("","","","!\n");
>
> next;
>
> }
>
>
>
> if (/^(snmp set community )\S+/ && $filter_commstr) {
>
> ProcessHistory("","","","end\n");
>
> next;
>
> }
>
>
>
> ProcessHistory("","","","$_");
>
> }
>
> return;
>
> }
>
>
>
> Can anybody help me with this issue or have anybody a Rancid scripts to
> connect with Enterasys system via SSH.
>
>
>
> Thanks very much for you time and support
>
>
>
> Bes Regards
>
> Victor
>
>
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
--
Alan McKinnon
alan.mckinnon at gmail.com
More information about the Rancid-discuss
mailing list