mac下面iterm2自动连接远程服务器
2017-05-23 本文已影响2030人
love_program
一、填写iterm2的配置文件

二、在家目录添加配置文件 ~/.ssh
- 新建配置文件
touch centos7
- 配置文件中添加一下内容
#!/usr/bin/expect -f
set host 192.168.100.119(服务器ip地址)
set user root(登录服务器的用户名)
set password admin(登录服务器的密码)
#set timeout -1
spawn ssh $user@$host
expect "*assword:*"
send "$password\r"
interact
expect eof
三、此时已经配好了,可以自动连接
