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:
***@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.
***@LNX01:/usr/lib/rancid/bin$
---
Nathan
Post by Nathan BurgerhoutSee below for the .cloginrc config that I use now.
# 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
Post by Bob BCan you post your sanitized .cloginrc stanza?
I'll compare it to what I have and see if anything stands out.
BB
-----Original Message-----
Behalf Of Nathan Burgerhout
Sent: Friday, September 05, 2014 2:08 PM
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
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-----
On
Behalf Of Nathan Burgerhout
Sent: Friday, September 05, 2014 8:40 AM
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