linux 服务器之间文件传送

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
"

posted @ 2018-01-24 15:44  北方客888  阅读(155)  评论(0编辑  收藏  举报