Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@tacacs ~]# su rancid
- [rancid@tacacs root]$ cd /usr/local/rancid/
- [rancid@tacacs ~]$ expect -d /usr/local/rancid/bin/hlogin -f /usr/local/rancid/.cloginrc clswitch1
- expect version 5.43.0
- argv[0] = expect argv[1] = -d argv[2] = /usr/local/rancid/bin/hlogin argv[3] = -f argv[4] = /usr/local/rancid/.cloginrc argv[5] = clswitch1
- set argc 3
- set argv0 "/usr/local/rancid/bin/hlogin"
- set argv "-f /usr/local/rancid/.cloginrc clswitch1"
- executing commands from command file /usr/local/rancid/bin/hlogin
- clswitch1
- spawn hpuifilter -- telnet clswitch1
- parent: waiting for sync byte
- parent: telling child to go ahead
- parent: now unsynchronized from child
- spawn: returns {22091}
- 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
- "(Username|login|user name):"? no
- "([Pp]assword|passwd):"? no
- "#"? no
- "denied"? no
- "% Bad passwords"? no
- Trying 172.16.1.54...
- telnet: connect to address 172.16.1.54: Connection refused
- telnet: Unable to connect to remote host: Connection refused
- expect: does "Trying 172.16.1.54...\r\r\r\ntelnet: connect to address 172.16.1.54: Connection refused\r\r\ntelnet: Unable to connect to remote host: Connection refused\r\r\n" (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)"? 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.1.54...\r\r\r\ntelnet: connect to address 172.16.1.54: Connection refused"
- spawn hpuifilter -- ssh -c 3des -x -l rancid clswitch1
- parent: waiting for sync byte
- parent: telling child to go ahead
- parent: now unsynchronized from child
- spawn: returns {22095}
- 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
- "(Username|login|user 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
- * Special events
- Please register your products now at: www.ProCurve.com
- 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\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\n" (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 "We'd like to keep you up to date about:\r\r\n * Software feature updates\r\r\n * New product announcements\r\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\n" (spawn_id exp6) match glob pattern "unknown host\r"? 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\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\n" (spawn_id exp6) match regular expression "Enter passphrase.*: "? no
- "(Username|login|user name):"? no
- "([Pp]assword|passwd):"? no
- "#"? no
- "denied"? no
- "% Bad passwords"? no
- rancid@clswitch1'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\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\nrancid@clswitch1's password: " (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 "We'd like to keep you up to date about:\r\r\n * Software feature updates\r\r\n * New product announcements\r\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\nrancid@clswitch1's password: " (spawn_id exp6) match glob pattern "unknown host\r"? 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\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\nrancid@clswitch1's password: " (spawn_id exp6) match regular expression "Enter passphrase.*: "? no
- "(Username|login|user 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 announcements\r\r\n * Special events\r\r\n\r\r\nPlease register your products now at: www.ProCurve.com\r\r\n\r\r\nrancid@clswitch1's password:"
- send: sending "<PASSWORD OMITTED>\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
- expect: timed out
- Error: TIMEOUT reached
- [rancid@tacacs ~]$
- [rancid@tacacs ~]$ /usr/local/rancid/bin/hlogin -autoenable -c "show cpu" clswitch1
- clswitch1
- spawn hpuifilter -- telnet clswitch1
- Trying 172.16.1.54...
- telnet: connect to address 172.16.1.54: Connection refused
- telnet: Unable to connect to remote host: Connection refused
- spawn hpuifilter -- ssh -c 3des -x -l rancid clswitch1
- We'd like to keep you up to date about:
- * Software feature updates
- * New product announcements
- * Special events
- Please register your products now at: www.ProCurve.com
- rancid@clswitch1's password:
- Error: TIMEOUT reached
- [rancid@tacacs ~]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement