Expect 在 spawn 时提示输入两次密码

Expect 在 spawn 时提示输入两次密码
spawn ssh -q [email protected]
Password:
Password:

在我发送密码之前,Expect 期望为空。

调试信息

expect: does "" (spawn_id exp6) match glob pattern "yes/no"? no
"Password: "? no
Password:
expect: does "Password: " (spawn_id exp6) match glob pattern "yes/no"? no
"Password: "? yes
expect: set expect_out(0,string) "Password: "
expect: set expect_out(spawn_id) "exp6"
expect: set expect_out(buffer) "Password: "
send: sending "password \r" to { exp6 }

expect: does "" (spawn_id exp6) match glob pattern "*>"? no

相关内容