Centos7 - githup ssh方式配置代理

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7 - githup ssh方式配置代理相关的知识,希望对你有一定的参考价值。

配置

# 生成公钥、私钥。把公钥上传至githup上。
[[email protected] ~]# ssh-keygen -t rsa  # 一路回车,默认私钥在~/.ssh/id_rsa

# 配置ssh代理
[[email protected] ~]# 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

# 测试
[[email protected] ~]# ssh -T [email protected]  # 显示如下,说明ok
Hi xxx! You‘ve successfully authenticated, but GitHub does not provide shell access.


tips: connect-proxy需要额外安装包,下载链接见:

http://rpm.pbone.net/index.php3/stat/4/idpl/34752384/dir/redhat_el_7/com/connect-proxy-1.100-13.el7.x86_64.rpm.html


参考链接

https://www.chenyudong.com/archives/use-git-or-github-in-company-local-net.html

https://www.chenyudong.com/archives/ssh-using-private-public-key-no-password.html


本文出自 “the-way-to-cloud” 博客,请务必保留此出处http://iceyao.blog.51cto.com/9426658/1921833

以上是关于Centos7 - githup ssh方式配置代理的主要内容,如果未能解决你的问题,请参考以下文章

Centos7-yum部署配置LAMP-之LAMP及php-fpm实现反代动态资源

第五篇:Centos7上配置docker容器ssh登录

centos7配置ssh

centos7配置ssh连接

CentOS7.4踩坑

centos7配置Hadoop集群环境