linux 服务器之间文件传送免密码输入传递:
expect -c "
set timeout 10
spawn scp ××××××.tar.bz2 root@172.16.17.34:/
expect yes/no { send yes\r ; exp_continue }
expect password: { send ××××××\r }
expect 100%
sleep 1
"
linux 服务器之间文件传送免密码输入传递:
expect -c "
set timeout 10
spawn scp ××××××.tar.bz2 root@172.16.17.34:/
expect yes/no { send yes\r ; exp_continue }
expect password: { send ××××××\r }
expect 100%
sleep 1
"
转载于:https://www.cnblogs.com/xiaoyaojinzhazhadehangcheng/p/8341968.html