/root/.ssh (以下為 root權限的操作)
1. 生成key.
$ ssh-keygen
一路回車,直到生成 id_rsa, id_rsa.pub
1.1 chmod 400 id_rsa.pub
2. 修改 /etc/ssh/ssh_config 文件 (root用戶) //普通用戶 vim ~/.ssh/config (沒有則新建文件)
增加
Host github.com *.github.com ProxyCommand connect-proxy -H web-proxy.oa.com:8080 %h %p #設置代理 IdentityFile ~/.ssh/id_rsa User git
3. 安裝 connect-proxy
3.1. rpm文件下載
http://rpm.pbone.net/index.php3?stat=3&search=connect-proxy&srodzaj=3
3.2. rpm的安裝
http://www.discuz.net/thread-3513163-1-1.html
4.1 把你的 id_rsa.pub (空格,什么都不能動,原樣copy到 git的ssh key 設置)
測試驗證
5. ssh -v -T git@github.com