Discussion:
[rancid] No successful runs - SSH AAA enabled devices
Michael K. Smith - Adhost
2009-11-10 17:35:53 UTC
Permalink
Hello Everyone:

Environment:
FreeBSD 6.4
Expect 5.44.1.11
TCL 8.6

Problem:
Any device that is ssh-enabled (version 2) using AAA authentication (so
no secondary enable pass required) is failing.

.cloginrc info (sanitized)
add user hostname.tld.com rancid
add password hostname.tld.com p\@ssword (note the escape of the @)
add autoenable hostname.tld.com 1
add method hostname.tld.com ssh
add cyphertype hostname.tld.com 3des

Troubleshooting:
clogin -d hostname.tld.com -> Successful

Log Output:
- Routers (GSR's)
hostname.tld.com: missed cmd(s): show rsp chassis-info,show module,write
term,show running-config
hostname.tld.com: End of run not found
- Switches (mix of 3560's and 4006's)
hostname.tld.com: missed cmd(s): write term,show running-config
hostname.tld.com: End of run not found

I've confirmed via clogin that the commands above, particularly the
write term and sho running are working correctly.

Any help would be greatly appreciated.

Kind Regards,

Mike
--
Michael K. Smith - CISSP, GISP
Adhost Internet LLC ***@adhost.com
w: +1 (206) 404-9500 f: +1 (206) 404-9050
PGP: B49A DDF5 8611 27F3 08B9 84BB E61E 38C0 (Key ID: 0x9A96777D)
john heasley
2009-11-10 20:48:41 UTC
Permalink
Post by Michael K. Smith - Adhost
FreeBSD 6.4
Expect 5.44.1.11
TCL 8.6
Any device that is ssh-enabled (version 2) using AAA authentication (so
no secondary enable pass required) is failing.
.cloginrc info (sanitized)
add user hostname.tld.com rancid
add autoenable hostname.tld.com 1
add method hostname.tld.com ssh
add cyphertype hostname.tld.com 3des
clogin -d hostname.tld.com -> Successful
- Routers (GSR's)
hostname.tld.com: missed cmd(s): show rsp chassis-info,show module,write
term,show running-config
hostname.tld.com: End of run not found
- Switches (mix of 3560's and 4006's)
hostname.tld.com: missed cmd(s): write term,show running-config
hostname.tld.com: End of run not found
I've confirmed via clogin that the commands above, particularly the
write term and sho running are working correctly.
try all the commands; look in the rancid script for the list.
clogin -c 'cmd1;cmd2;...' and verify that this works or helps identify
the problem.

freebsd's expect port seems to have recurring problems. i know this combo
works ATM:
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
FreeBSD 8.0-RC1
Michael K. Smith - Adhost
2009-11-10 21:10:23 UTC
Permalink
-----Original Message-----
Sent: Tuesday, November 10, 2009 12:49 PM
To: Michael K. Smith - Adhost
Subject: Re: [rancid] No successful runs - SSH AAA enabled devices
Post by Michael K. Smith - Adhost
FreeBSD 6.4
Expect 5.44.1.11
TCL 8.6
Any device that is ssh-enabled (version 2) using AAA authentication
(so
Post by Michael K. Smith - Adhost
no secondary enable pass required) is failing.
.cloginrc info (sanitized)
add user hostname.tld.com rancid
the
@)
Post by Michael K. Smith - Adhost
add autoenable hostname.tld.com 1
add method hostname.tld.com ssh
add cyphertype hostname.tld.com 3des
clogin -d hostname.tld.com -> Successful
- Routers (GSR's)
hostname.tld.com: missed cmd(s): show rsp chassis-info,show
module,write
Post by Michael K. Smith - Adhost
term,show running-config
hostname.tld.com: End of run not found
- Switches (mix of 3560's and 4006's)
hostname.tld.com: missed cmd(s): write term,show running-config
hostname.tld.com: End of run not found
I've confirmed via clogin that the commands above, particularly the
write term and sho running are working correctly.
try all the commands; look in the rancid script for the list.
clogin -c 'cmd1;cmd2;...' and verify that this works or helps identify
the problem.
freebsd's expect port seems to have recurring problems. i know this combo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
FreeBSD 8.0-RC1
Ouch. :-) I reverted to the Expect and TCL versions above and now I
get the output below. BTW, I confirmed that the commands listed are
available on the device. Obviously, there are some commands that aren't
going to work "sho rsp" as an example. Do these need to be commented
out in the rancid script?

Regards,

Mike

starting: Tue Nov 10 13:00:53 PST 2009



Trying to get all of the configs.
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
"expect -nobrace -re+ { exp_continue } -re {^[^
^M *]*3550_f-3-a([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"
} -re {^..."
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 39)
invoked from within
"run_commands $prompt $command"
("foreach" body line 149)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/home/rancid/bin/clogin" line 723)
3550f-3-a.adhost.com: missed cmd(s): write term,show running-config
3550f-3-a.adhost.com: End of run not found
!
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
"expect -nobrace -re+ { exp_continue } -re {^[^
^M *]*sea-bsw05([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"
} -re {^[..."
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 39)
invoked from within
"run_commands $prompt $command"
("foreach" body line 149)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/home/rancid/bin/clogin" line 723)
sea-bsw05.adhost.com: missed cmd(s): write term,show running-config
sea-bsw05.adhost.com: End of run not found
!
=====================================
Getting missed routers: round 1.
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
"expect -nobrace -re+ { exp_continue } -re {^[^
^M *]*sea-bsw05([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"
} -re {^[..."
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 39)
invoked from within
"run_commands $prompt $command"
("foreach" body line 149)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/home/rancid/bin/clogin" line 723)
sea-bsw05.adhost.com: missed cmd(s): write term,show running-config
sea-bsw05.adhost.com: End of run not found
!
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
"expect -nobrace -re+ { exp_continue } -re {^[^
^M *]*3550_f-3-a([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"
} -re {^..."
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 39)
invoked from within
"run_commands $prompt $command"
("foreach" body line 149)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/home/rancid/bin/clogin" line 723)
3550f-3-a.adhost.com: missed cmd(s): write term,show running-config
3550f-3-a.adhost.com: End of run not found
!

cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs

ending: Tue Nov 10 13:03:17 PST 2009
(END)

Loading...