mac下面iterm2自动连接远程服务器
转载地址: https://www.jianshu.com/p/d75dc43be7a7
mac下面iterm2自动连接远程服务器
一、填写iterm2的配置文件
1.png
二、在家目录添加配置文件 ~/.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
三、此时已经配好了,可以自动连接
2.png
还没有评论,来说两句吧...