[rancid] HP switches

Munroe Sollog mus3 at Lehigh.EDU
Thu May 22 14:29:58 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm investigating rancid as a way to reliably download configs from HP switches.  Below I have
included my .cloginrc file as well as the output from hlogin.  It seems to log in successfully,
however it never executes the command.  Any help would be appreciated

.cloginrc
- ---------------------
add password * password
add user * user



$ /usr/local/rancid/bin/hlogin -d -noenable -c "y;show version" 172.16.203.244
172.16.203.244
spawn hpuifilter -- telnet 172.16.203.244
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {23604}

expect: does "" (spawn_id exp6) match glob pattern "Press any key to continue"? no
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed by)"? no
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? no
"Offending key for .* \(yes/no\)\?"? no

expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp6) match regular expression "Enter passphrase.*: "? no
"([Uu]sername|[Ll]ogin|user name|Login Name):"? no
"([Pp]assword|passwd):"? no
">"? no
"denied"? no
"% Bad passwords"? no
Trying 172.16.203.244...
telnet: connect to address 172.16.203.244: Connection refused
telnet: Unable to connect to remote host: Connection refused

expect: does "Trying 172.16.203.244...\r\r\r\ntelnet: connect to address 172.16.203.244:
Connection refused\r\r\ntelnet: Unablo
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed by)"? yes
expect: set expect_out(0,string) "Connection refused"
expect: set expect_out(1,string) "Connection refused"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "Trying 172.16.203.244...\r\r\r\ntelnet: connect to address
172.16.203.244: Connection refused"
spawn hpuifilter -- ssh -c 3des -x -l user 172.16.203.244
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {23608}

expect: does "" (spawn_id exp6) match glob pattern "Press any key to continue"? no
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed by)"? no
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? no
"Offending key for .* \(yes/no\)\?"? no

expect: does "" (spawn_id exp6) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp6) match regular expression "Enter passphrase.*: "? no
"([Uu]sername|[Ll]ogin|user name|Login Name):"? no
"([Pp]assword|passwd):"? no
">"? no
"denied"? no
"% Bad passwords"? no
We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements

expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed by)"? no
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? no
"Offending key for .* \(yes/no\)\?"? no

expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro

expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro
"([Uu]sername|[Ll]ogin|user name|Login Name):"? no
"([Pp]assword|passwd):"? no
">"? no
"denied"? no
"% Bad passwords"? no
  * Special events

Please register your products now at:  www.ProCurve.com

user at 172.16.203.244's password:
expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed by)"? no
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? no
"Offending key for .* \(yes/no\)\?"? no

expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro

expect: does "We'd like to keep you up to date about:\r\r\n  * Software feature updates\r\r\n  *
New product announcements\r\ro
"([Uu]sername|[Ll]ogin|user name|Login Name):"? no
"([Pp]assword|passwd):"? yes
expect: set expect_out(0,string) "password:"
expect: set expect_out(1,string) "password"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "We'd like to keep you up to date about:\r\r\n  * Software feature
updates\r\r\n  * New product"
send: sending "password\r" to { exp6 }

expect: does " " (spawn_id exp6) match glob pattern "Press any key to continue"? no
"[Pp]assword:"? no
">"? no


expect: does " \r\r\n" (spawn_id exp6) match glob pattern "Press any key to continue"? no
"[Pp]assword:"? no
">"? no
ProCurve J9299A Switch 2520G-24-PoE
Software revision J.14.01


expect: does " \r\r\nProCurve J9299A Switch 2520G-24-PoE\r\r\r\nSoftware revision
J.14.01\r\r\r\n\r\r\r\n" (spawn_id exp6) mato
"[Pp]assword:"? no
">"? no
Copyright (C) 1991-2009 Hewlett-Packard Co.  All Rights Reserved.

                           RESTRICTED RIGHTS LEGEND

 Use, duplication, or disclosure by the Government is subject to restrictions
 as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and

expect: does " \r\r\nProCurve J9299A Switch 2520G-24-PoE\r\r\r\nSoftware revision
J.14.01\r\r\r\n\r\r\r\nCopyright (C) 1991-20o
"[Pp]assword:"? no
">"? no
 Computer Software clause at 52.227-7013.

         HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303

Press any key to continue
expect: does " \r\r\nProCurve J9299A Switch 2520G-24-PoE\r\r\r\nSoftware revision
J.14.01\r\r\r\n\r\r\r\nCopyright (C) 1991-20s
expect: set expect_out(0,string) "Press any key to continue"
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) " \r\r\nProCurve J9299A Switch 2520G-24-PoE\r\r\r\nSoftware
revision J.14.01\r\r\r\n\r\r\r\nCop"
send: sending " " to { exp6 }
expect: continuing expect

expect: does "" (spawn_id exp6) match glob pattern "Press any key to continue"? no
"[Pp]assword:"? no
">"? no
Richards_switch_F#
expect: does "Richards_switch_F# " (spawn_id exp6) match glob pattern "Press any key to continue"? no
"[Pp]assword:"? no
">"? no




sighandler: handling signal(2)
async event handler: Tcl_Eval(exit 130)


- -- 
Munroe Sollog
LTS - Network Analyst
x85002
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQEcBAEBAgAGBQJTfgnlAAoJEPbbZiWCKDVC5SQH/30YAKrkZu8h7ZnOwP4XYf9E
JNC1xGykdXQ/to/AAFvyBXmgeDGnXjypGbKCoi/xAEbfElGxa6PI4p69XK9z0gxS
1aGNy0SIJrCy2/AnYg7sneYitt8JC1vHkNoxUGDioIkMoYbOzVvUH6rerx7imXNU
BaIVWG43FUHJ2YSU4nNlxfF+WjhTbZXt3djJiGUuwW9vWDUy9JHqG71y8UmUb57w
GgPJwpIk5nIFeYB6CU+lTVNGoAwbLhISilWsTywT+ctyv9dtVY64fz+QOwkgC4Oc
EB0ZH2gi8rAXtFHMIPcOC7hGSoV+NbVZFb8SoG3EskbYC3Tk6X8bnl/rmmhf0ac=
=jJ1n
-----END PGP SIGNATURE-----


More information about the Rancid-discuss mailing list