#!/usr/bin/expect -f
set password password
#download
spawn scp root@192.168.1.100:/opt/step3.sh /home/
set timeout 30
expect "root@192.168.1.100's password:"
set timeout 30
send "$password\r"
set timeout 30
send "exit\r"
expect eof
阅读(1572) | 评论(0) | 转发(0) |