SSH 配置,ssh配置


ssh免密通用配置

Host * 

Port 1234

User root

#ProxyCommand nc -X 5 -x 127.0.0.1:1081 %h %p #5 socks5, 4 socks4,connect https

ServerAliveInterval 60

IdentityFile    ~/.ssh/private

配置属性说明

Host: * 代表任意,也可以指定某个域名 *.baidu.com,特别在局域网集群免密使用

Port: 公网linux会有修改默认端口22的情况

User:用户名,Git仓库可以用git账户

ProxyCommand:链接国外服务器时,有时需要代理访问(原因大家都懂的),在mac上没有xshell类似工具时可以使用

ServerAliveInterval: 向服务器发送空包的时间间隔(为了保持连接)

IdentityFile: 私有密钥文件

 

相关内容

    暂无相关文章