第一个用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"
相关文章
相关标签/搜索