在你電腦的任意位置建立自動登陸的腳本shell
#!/usr/bin/expect -f set user _user set host _host set password _password set timeout -1 spawn ssh $user@$host expect "*assword:*" send "$password\r" interact expect eof 複製代碼
tip:替換_user用戶名, _host服務器地址, _password密碼vim