vd.gif

#!/bin/bash

scpHOST=192.168.52.133
scpPORT=22
scpUSER=root
scpKEY=123456
scpHOME=/opt/ftp/


scpFILE="scp.sh"

expect -c "
set timeout 600;
spawn /usr/bin/scp -P ${scpPORT} ${scpFILE} ${scpUSER}@${scpHOST}:${scpHOME}
expect {
\"*yes/no*\" {send \"yes\r\"; exp_continue}
\"*password*\" {send \"${scpKEY}\r\";}
}
expect eof;"

发表回复

您的电子邮箱地址不会被公开。

Captcha Code