linux自动登录脚本

2019-07-13 02:10发布

#!/usr/bin/expect -f set host 10.1.2.3 set user root set password 123456 #set timeout -1 spawn ssh $user@$host expect "*assword:*" send "$password " interact expect eof
$ ssh root@10.1.2.3 root@10.1.2.3's password:
$ whereis expect /usr/bin/expect