except自动登录的几段代码分享
复制代码 代码如下:#!/usr/bin/expect -fset timeout 30set host "192.168.1.198"spawn ssh $hostexpect_before "no)?" {send "yes
" }sleep 1expect "password:"send "123456
"expect "*#"send "echo my name is fivetrees > /root/fivetrees.txt
"inte...