This commit is contained in:
2023-10-19 17:56:47 +08:00
parent 95a7e79878
commit 9f34f2be2d

View File

@@ -13,7 +13,7 @@ while read line
for toolname in $toollist;do for toolname in $toollist;do
expect <<EOF expect <<EOF
set timeout 10 set timeout 10
spawn scp $tooldir/$toolname $user@$ip:/tmp && ssh $user@$ip sudo cp /tmp/$toolname $tooldir spawn "scp $tooldir/$toolname $user@$ip:/tmp && ssh $user@$ip sudo cp /tmp/$toolname $tooldir"
expect { expect {
"yes/no" { send "yes\n";exp_continue } "yes/no" { send "yes\n";exp_continue }
"password" { send "$passwd\n" } "password" { send "$passwd\n" }