配置php
# 生成公鑰、私鑰。把公鑰上傳至github上。 [root@compute01 ~]# ssh-keygen -t rsa # 一路回車,默認私鑰在~/.ssh/id_rsa # 配置ssh代理 [root@compute01 ~]# cat ~/.ssh/config Host github.com *.github.com ProxyCommand connect-proxy -H web-proxy.xxx.com:8080 %h %p IdentityFile ~/.ssh/id_rsa User git # 測試 [root@compute01 ~]# ssh -T git@github.com # 顯示以下,說明ok Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
tips: connect-proxy須要額外安裝包,下載連接見:html
參考連接github
https://www.chenyudong.com/archives/use-git-or-github-in-company-local-net.html web
https://www.chenyudong.com/archives/ssh-using-private-public-key-no-password.html shell