解决ssh: connect to host github.com port 22: Connection refused


网上的方案

链接: link
1.

vim ~/.ssh/config
Host github.com  
User xxxxx@xx.com  
Hostname ssh.github.com  
PreferredAuthentications publickey  
IdentityFile ~/.ssh/id_rsa  
Port 443

修改host
首先到 ipaddress 输入 github.com 查找到其IP地址
将查到的IP地址和网址映射放到你的本地 hosts 文件中即可,例子:140.82.112.4 github.com
windowshost 默认地址: C:\Windows\System32\drivers\etc

我的解决方案

关闭加速器,成功解决。

你可能感兴趣的:(报错,git,github,ssh)