linux
SSH config 配置
直接看我的配置文件(vim ~/.ssh/config)
Host wotokenHostName 192.168.2.18IdentityFile ~/.ssh/id_rsaUser rootPort 22IdentitiesOnly yesHost bobaotestHostName 192.168.2.1IdentityFile ~/.ssh/id_rsaUser rootPort 22IdentitiesOnly yes
新建配置文件
cd ~/.sshtouch config
然后把你的服务器的一些配置按照上面给出的格式配置一下即可vim ~/.ssh/config
Host wotokenHostName 192.168.2.18IdentityFile ~/.ssh/id_rsaUser rootPort 22IdentitiesOnly yesHost bobaotestHostName 192.168.2.1IdentityFile ~/.ssh/id_rsaUser rootPort 22IdentitiesOnly yes
登陆(输入以下命令)
ssh wotokenssh bobaotest