[rancid] Can't connect to Enterasys via SSH
Victor Ruiz
victor.ruiz at satec.es
Fri Oct 18 11:57:45 UTC 2013
Hi, Thank for the reply;
When I try to do login with rivlogin the follow error appear:
rancid at monrancid1:~/bin$ /usr/local/rancid/bin/rivlogin -f /usr/local/rancid/.cloginrc b5b1.XXXX
Trying 10.XX.XX.XX...
telnet: Unable to connect to remote host: Connection refused
ERROR: device closed telnet connection during login
rancid at monrancid1:~/bin$
But if I run the command: "/usr/local/rancid/bin/clogin -c "show config" b5b1.XXXX" run properly:
rancid at monrancid1:~/bin$ /usr/local/rancid/bin/clogin -c "show config" b5b1.XXXX b5b1.XXXX
spawn ssh -c 3des -x -l admin b5b1.XXXX
admin at b5b1.infojobs's password:
Enterasys B5
Command Line Interface
Enterasys Networks, Inc.
9 Northeastern Boulevard
Salem, NH 03079 U.S.A.
Phone: +1 603 952 5000
E-mail: support at enterasys.com
WWW: http://www.enterasys.com
(c) Copyright Enterasys Networks, Inc. 2013
....
....
....
#webview
!
#width
!
end
I suppose that this is because the rivlogin haven't option to connect via SSH.
I copy the clogin to entlogin and rivrancid to entranced and I include the entlogin inside racid-fe as new device, with this configuration I can login in the Enterasys device but in the logfile the message appear:
Trying to get all of the configs.
b5b1.XXXX: missed cmd(s): show config
b5b1.XXXX: End of run not found
!
=====================================
Getting missed routers: round 1.
b5b1.XXXX: missed cmd(s): show config
b5b1.XXXX: End of run not found
!
=====================================
Getting missed routers: round 2.
b5b1.XXXX: missed cmd(s): show config
b5b1.XXXX: End of run not found
!
=====================================
Getting missed routers: round 3.
b5b1.XXXX: missed cmd(s): show config
b5b1.XXXX: End of run not found
!
=====================================
Getting missed routers: round 4.
b5b1.XXXX: missed cmd(s): show config
b5b1.XXXX: End of run not found
!
Any idea?
Many thanks.
Victor
-----Mensaje original-----
De: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] En nombre de Alan McKinnon
Enviado el: viernes, 18 de octubre de 2013 13:28
Para: rancid-discuss at shrubbery.net
Asunto: Re: [rancid] Can't connect to Enterasys via SSH
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
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
More information about the Rancid-discuss
mailing list