[rancid] Two Cisco device's on one WAN IP

Nathan Burgerhout nathan.burgerhout at gmail.com
Fri Oct 24 10:33:31 UTC 2014


Hello,

Tried different options, but I'm still stuck at this point. Can anyone help
me solve this last problem?
My new .cloginrc and output are bellow.

.cloginrc:
add method site02-redirected ssh telnet
add user site02-redirected sadmin
add password site02-redirected {boterkoek23}

add method site02 {usercmd}
add user site02 sadmin
add password site02 {boterkoek23} {boterkoek23}
add usercmd site02 {/usr/lib/rancid/bin/clogin} {-noenable}
{site02-redirected}
add usercmd_chat site02 {site-rt01>} {ssh -l sadmin 10.0.0.29\r}
{boterkoek23} {}
#add autoenable {01}
#add enableprompt site02 {boterkoek23}
#add usercmd_chat kogros02 {site-rt02>} {enable\r} {boterkoek23\r}

Output of ./clogin site02:
ruser at LNX01:/usr/lib/rancid/bin$ ./clogin site02
site02
spawn /usr/lib/rancid/bin/clogin -noenable site02-redirected
site02-redirected
spawn ssh -c 3des -x -l sadmin site02-redirected
Password:
site-rt01>ssh -l sadmin 10.0.0.29

site-rt01>ssh -l sadmin 10.0.0.29
Password:
% Password:  timeout expired!
[Connection to 10.0.0.29 aborted: error status 0]
site-rt01>exit

Timeout in usercmd_chat waiting for -re boterkoek23: punting with CR

site-rt01>boterkoek23
Translating "boterkoek23"...domain server (255.255.255.255)

% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
site-rt01>boterkoek23
% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
site-rt01>enable
Password:
site-rt01#
site-rt01#exit
Connection to site02-redirected closed by remote host.
Connection to site02-redirected closed.
ruser at LNX01:/usr/lib/rancid/bin$

---
Nathan

2014-09-09 16:40 GMT+02:00 Nathan Burgerhout <nathan.burgerhout at gmail.com>:

> See below for the .cloginrc config that I use now.
>
> .cloginrc:
>
> # Customer_A SSH login
> # Router 01
> add method Customer_A01 ssh telnet
> add user Customer_A01 {rancid}
> add password Customer_A01 {&g584g&agdf$VF$%*(#FHGFukt} {&^4g578$V784v78$*}
>
> # Router 02 behind router 01
> add method Customer_A02 {usercmd}
> add user Customer_A02 {sadmin}
> add password Customer_A02 {boterkoek23} {boterkoek23}
> add usercmd Customer_A02 {/usr/lib/rancid/bin/clogin} {Customer_A01}
> {boterkoek23}
> add usercmd_chat Customer_A02 {>} {ssh 10.0.0.253} {boterkoek23}
> {10.0.0.253}
>
> # General Login
> add user * {rancid}
> add password * {&g584g&agdf$VF$%*(#FHGFukt} {&^4g578$V784v78$*}
> add method * ssh telnet
>
>
> *J. Burgerhout*
> Krimpen aan den IJssel
> Tel.         (06) 83080710
> Web.      www.xentux.com/jonathan
>
>
>
> 2014-09-05 20:43 GMT+02:00 Bob B <bob at softscape.ca>:
>
>> Can you post your sanitized .cloginrc stanza?
>>
>> I'll compare it to what I have and see if anything stands out.
>>
>> BB
>>
>>
>>
>> > -----Original Message-----
>> > From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On
>> > Behalf Of Nathan Burgerhout
>> > Sent: Friday, September 05, 2014 2:08 PM
>> > To: Bob B; rancid-discuss at shrubbery.net
>> > Subject: Re: [rancid] Two Cisco device's on one WAN IP
>> >
>> > Thank you Bob.
>> >
>> >
>> > I tried to do this, but it didn't work. It just stops at the point where
>> > it types the seconds SSH. The problem could be that my Cisco's
>> > authenticate through a Tacacs+ server. I'm going to try some more. At
>> > least I'm going in the right direction.
>> >
>> >
>> > ---
>> > Nathan
>> >
>> >
>> > 2014-09-05 19:27 GMT+02:00 Bob B <bob at softscape.ca>:
>> >
>> >
>> >       Nathan,
>> >
>> >       If it's any help, this is how we do it. We have many devices
>> fitting
>> > this exact scenario and it seems to work reasonably well.
>> >
>> >       The configuration is a bit more involved in the .cloginrc file,
>> but
>> > not overly complicated.
>> >
>> >       Bob.
>> >
>> >
>> >
>> >
>> >       > -----Original Message-----
>> >       > From: Rancid-discuss [mailto:
>> rancid-discuss-bounces at shrubbery.net]
>> > On
>> >       > Behalf Of Nathan Burgerhout
>> >       > Sent: Friday, September 05, 2014 8:40 AM
>> >       > To: rancid-discuss at shrubbery.net
>> >       > Subject: [rancid] Two Cisco device's on one WAN IP
>> >       >
>> >       > Hello everyone,
>> >       >
>> >       >
>> >       > I hope that I'm in the right place to ask this.
>> >       >
>> >       > Recently I installed Rancid so that I can backup the Cisco
>> devices
>> > from my
>> >       > customers. I have it working for one device. The second device
>> can
>> > only be
>> >       > accessed by using SSH from the first Cisco to the second Cisco.
>> >       >
>> >       >
>> >       > Rancid Server at work --> Internet --> Cisco A --> Cisco B
>> >       >
>> >       >
>> >       > Is this possible to do? The example in the link below is for a
>> > network
>> >       > where the Rancid server is local which isn't the case for me,
>> but
>> > it looks
>> >       > like I could use the usercmd method.
>> >       >
>> >       > http://www.shrubbery.net/pipermail/rancid-discuss/2008-
>> >       > September/003274.html
>> >       >
>> >       >
>> >       > Regards,
>> >       >
>> >       > Nathan
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20141024/95dd6471/attachment.html>


More information about the Rancid-discuss mailing list