使用expect 實現scp 自動輸入密碼

#!/usr/bin/expect set src_path "./opencv.tar.gz" set dst_path "/home/temp" set passwd "123456" spawn scp ${src_path} root@${ip}:${dst_path} expect { "password:" {
相關文章
相關標籤/搜索