#! /bin/sh
expect -c "
spawn scp -r asd.sh user@ip:/Users/
expect {
\"*assword\" {set timeout 300; send \"passwd\r\"; exp_continue;}
\"yes/no\" {send \"yes\r\";}
}
expect eof"
#! /bin/sh
expect -c "
spawn scp -r asd.sh user@ip:/Users/
expect {
\"*assword\" {set timeout 300; send \"passwd\r\"; exp_continue;}
\"yes/no\" {send \"yes\r\";}
}
expect eof"
本文标题:scp 免密expect脚本
本文链接:https://www.haomeiwen.com/subject/nxsheftx.html
网友评论