在你电脑的任意位置建立自动登陆的脚本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