脚本连接linux服务器

时间:2020-06-10 18:54:41   收藏:0   阅读:58
#!/usr/bin/expect -f
set user root 
set host xx.xx.xx.xxx
set password xxxxx
set timeout -1

spawn ssh $user@$host
expect "password:*"
send "$password\r"
interact

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!