關於expect使用ssh的問題

 spawn bash -c "ssh -t root@$argv" expect "* (yes/no)*" send "yes/r" expect -timeout 1 expect "* password:*" send "123456/r" expect -timeout 5 send "export DATE=`date +%F-%R`/r" expect -timeout 1 send
相關文章
相關標籤/搜索