- 论坛徽章:
- 16
|
expect: does "" (spawn_id exp6) match glob pattern "want"? no
"password:"? no
"No route"? no
#这部分应该是你ssh过去后的,没人任何output.
Enter passphrase for key '/home/q/home/abel.li/.ssh/id_rsa':
这个是终端输出,
expect: does "Enter passphrase for key '/home/q/home/abel.li/.ssh/id_rsa': " (spawn_id exp6) match glob pattern "want"? no
"password:"? no
"No route"? no
expect: timed out
是否匹配你的设定want/password/No route,没有一个匹配上。
expect: does "Enter passphrase for key '/home/q/home/abel.li/.ssh/id_rsa': " (spawn_id exp6) match glob pattern "]#"? no
expect: timed out
也不匹配]#
输出是Enter passphrase for key '/home/q/home/abel.li/.ssh/id_rsa':
应该写成expect "Enter"
send 你的密码
expect是一问一答形式,比如终端输出是Hello xxxx, 那你要捕获的是hello xxx的任意字符。然后send对应的答案。 你man expect看下关于expect的大概说明,然后结合这个debug看下就明白了。
|
|