1.首先要自己搭建一个代理
2. 确认机器装过nc,若没有,用`yum install -y nc`安装
centos 6使用yum安装软件_duang_huang的博客-CSDN博客
3. 修改ssh设置,在目录vim ~/.ssh/config
```
Host github.com
Hostname ssh.github.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
ProxyCommand nc -X connect -x 123.123.1.2:7890 %h %p
# ProxyCommand nc --proxy 123.123.1.2:39670 %h %p
ServerAliveInterval 20
```
4. 如果`nc`命令出问题可以参考这个链接Connect with SSH through a proxy - Stack Overflow