复制配置github的ssh密钥

git ssh 编程技术
发布日期 2025-12-13 更新日期 2025-12-13 阅读次数 6 文章字数 313

已有ssh键值对

从一个设备上复制到另一个设备。

下载 prikey 文件,移动到 ~/.ssh/文件名

设置权限为 400,也就是 r--

测试是否连通。

ssh -T git@github.com

记录遇到的一个问题,

kex_exchange_identification: Connection closed by remote host
Connection closed by xxx.xx.x.xx port 22

这个是因为代理服务商为了安全考虑,避免被人当作跳板,会主动拒绝 22 端口的连接,导致无法正常连接到 Github 的服务器

创建或编辑 ~/.ssh/config 文件,让它走443端口

Host github.com
    Hostname ssh.github.com
    Port 443
    User git

此时就正常了。

 

文章作者: 朱丰华

文章链接: https://smart.52dixiaowo.com/blog/post-548.html

版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。

git ssh

发表评论

相关推荐
朱丰华   |   1天前   |   npm · js · nodejs

windows安装使用nvm

7    评论    点赞
朱丰华   |   1年前   |   git

git从缓存中移除数据git rm --cached

712    评论    点赞
朱丰华   |   2年前   |   linux · upx

Linux下安装UPX

1.1    评论    点赞
朱丰华   |   2年前   |   git

git push -u参数是什么意思?--set-upstream

552    评论    点赞
朱丰华   |   2年前   |   git · hub · 仓库

go克隆并引用github仓库

410    评论    点赞
朱丰华   |   2年前   |   git · add · 文件

git add -A 和 git add . 的区别

225    评论    点赞
朱丰华   |   2年前   |   php

windows下编写、编译php扩展

346    评论    点赞
朱丰华   |   2年前   |   linux · php

linux下编写、编译php扩展

294    评论    点赞
朱丰华   |   2年前   |   html

npm clean-mark,抓取网页文章内容,转换成markdown、html、txt

333    评论    点赞
朱丰华   |   2年前   |   php · 混淆 · obfuscate · git

yakpro-po混淆php代码

280    评论    点赞
朱丰华   |   2年前   |   javascript · js · obfuscator · 混淆

javascript-obfuscator混淆js文件

179    评论    点赞
朱丰华   |   2年前   |   nvm · git · 安装

entos7安装、使用nvm

241    评论    点赞
朱丰华   |   2年前   |   python · linux · www

linux给www用户【非root】安装python3

413    评论    点赞
朱丰华   |   2年前   |   docker · 安装 · linux

centos安装docker

237    评论    点赞
朱丰华   |   2年前   |   php · 编译

ubuntu、centos系统从源码编译指定版本php--超详细

295    评论    点赞
朱丰华   |   2年前   |   php · git · 编译

从源码编译php

270    评论    点赞
朱丰华   |   2年前   |   php · zend · 反射 · api

php zend引擎api接口:ZENDAPI阅读,反射调用示例

272    评论    点赞
朱丰华   |   2年前   |   gcc · 安装 · git

windows下安装gcc

292    评论    点赞
朱丰华   |   2年前   |   php · 混淆 · obfuscate · git

php代码混淆yakpro-po

451    评论    点赞
朱丰华   |   2年前   |   git · 文件

git对比任意两次commit提交的差异文件

399    评论    点赞
{{item.author_name}}   |   {{new Date(item.date*1000).log()}}   |   {{it}} ·

{{item.title}}

{{item.uv}}    评论    点赞