config
#
my config
#
Host github
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
ProxyCommand nc -v -x 127.0.0.1:1081 %h %p
Host gitlab
HostName gitlab.com
User git
IdentityFile ~/.ssh/id_rsa
ProxyCommand nc -v -x 127.0.0.1:1081 %h %p
Host bitbucket
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa
ProxyCommand nc -v -x 127.0.0.1:1081 %h %p
Host gitee
HostName gitee.com
User git
IdentityFile ~/.ssh/id_rsa
################ others ################
Host *
# 复用之前已经建立的连接
ControlMaster auto
# 在最后一个连接关闭之后也不真正的关掉连接
ControlPersist yes
# 心跳
ServerAliveInterval 60
# 指定了这个连接的 socket 保存的路径
ControlPath ~/.ssh/connection-%r@%h:%p
# ServerAliveCountMax 20
# ForwardAgent yes
# KexAlgorithms +diffie-hellman-group1-sha1
# PreferredAuthentications publickey
# TCPKeepAlive no
# Compression yes
# 走 HTTP 代理
# ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=8081
# 走 socks5 代理(如 Shadowsocks)
# ProxyCommand nc -v -x 127.0.0.1:1080 %h %p
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。