- 论坛徽章:
- 0
|
回复 2# waker
154:~/wx/shell/terminal # ./auto_ssh.sh 10.137.22.110 110
expect version 5.44.1.11
argv[0] = /usr/bin/expect argv[1] = -d argv[2] = ./auto_ssh.sh argv[3] = 10.137.22.110 argv[4] = 110
set argc 2
set argv0 "./auto_ssh.sh"
set argv "10.137.22.110 110"
executing commands from command file ./auto_ssh.sh
spawn ssh 10.137.22.110 parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {16183}
expect: does "" (spawn_id exp4) match glob pattern "(yes/no)?"? no
"*assword:"? no
Password:
expect: does "Password: " (spawn_id exp4) match glob pattern "(yes/no)?"? no
"*assword:"? yes
expect: set expect_out(0,string) "Password:"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "Password:"
send: sending "mdsp105\n" to { exp4 }
send: sending "exit" to { exp4 }
expect: does " " (spawn_id exp4) match glob pattern "100%"? no
expect: does " \r\n" (spawn_id exp4) match glob pattern "100%"? no
Last login: Thu Feb 2 14:44:33 2012 from 10.137.23.3
|
|