第一個用SSH自動登陸router的shell腳本(expect)

#!/usr/bin/expect -f   set ip 192.168.31.1   //設置ip變量   set password admin    //設置密碼變量   set timeout 10            //設置超時時間   spawn ssh root@$ip         //ssh連接   expect {     "*yes/no" { send "yes\r"
相關文章
相關標籤/搜索