SSH客户端配置

在用户家目录下创建SSH客户端配置文件.ssh/config,内容如下:

# 单个主机配置
Host testhost
    HostName 192.168.1.100
# 全局配置
Host *
    User root
    Port 22

示例

Host a1n1
   Hostname a1-node1
   User root
   Port 22
   IdentityFile /root/38/id_rsa
Host b1n1
   Hostname b1-node1
   User root
   Port 22
   IdentityFile /root/38/id_rsa
posted @ 2020-10-22 11:03  Varden  阅读(185)  评论(0)    收藏  举报