脚本连接linux服务器

wys 2020-06-10

#!/usr/bin/expect -f
set user root 
set host xx.xx.xx.xxx
set password xxxxx
set timeout -1

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

相关推荐