This commit is contained in:
Luk Lu
2021-11-05 21:53:04 +08:00
parent fed07bf3f8
commit 8a0c0d9e1f
2 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
set timeout 30
spawn ssh [lindex $argv 1]@[lindex $argv 0] -p 22
expect {
"(yes/no)?"
"yes/no"
{send "yes\n";exp_continue}
"password:"
{send "[lindex $argv 2]\n";exp_continue}
@@ -13,7 +13,7 @@ expect {
{send "su\n";exp_continue}
"Password:"
{send "[lindex $argv 3]\ncd /faronear\n"}
# "密码:"
# {send "[lindex $argv 3]\ncd /faronear\n"}
"密码:"
{send "[lindex $argv 3]\ncd /faronear\n"}
}
interact