简体   繁体   English

ssh:连接到主机ssh.github.com端口443:连接被拒绝

[英]ssh: connect to host ssh.github.com port 443: Connection refused

I am in the push code: 我在推送代码中:

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

error, I find on the Internet, see someone say is to create a config file in ~/.ssh directory, enter in the config file 错误,我在网上找到,看到有人说是在~/.ssh目录中创建一个配置文件,在该配置文件中输入

Host github.com
User myusername
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

but ping github.com appeared ssh again: connect to host ssh.github.com port 443: Connection refused error, ask Dachen to tell me the solution 但是ping github.com再次出现ssh:连接到主机ssh.github.com端口443:连接被拒绝错误,请ssh.github.com告诉我解决方案

443 is the SSL port, not the SSH port, so this configuration is definitely incorrect . 443是SSL端口,而不是SSH端口, 因此此配置绝对不正确 Remove this configuration file. 删除此配置文件。

UPDATE : It turns out sshing to port 443 on github.com is actually valid, although most servers don't support this, and it may be blocked by your firewall even for github.com - see comment below. 更新 :原来ssh方式连接到端口443上github.com实际上有效的,虽然大多数服务器不支持此功能,并且可以通过你的防火墙甚至github.com被阻塞-请参见下面的评论。

It is unclear from your question whether the error message actually refers to port 22 or port 443, because the question contains two different error messages. 从您的问题尚不清楚该错误消息是实际指向端口22还是端口443,因为该问题包含两个不同的错误消息。 If it refers to port 22, it is probably caused by a firewall between you and GitHub, like a firewall at your place of work or study. 如果它指向端口22,则可能是由您和GitHub之间的防火墙引起的,例如您工作或学习场所的防火墙。 Use the HTTP URL for the repository instead of the SSH URL. 对存储库使用HTTP URL而不是SSH URL。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ssh:连接到主机example.com端口22:连接被拒绝 - ssh: connect to host example.com port 22: Connection refused gitlab 连接被拒绝 ssh 端口 22 和 443 - gitlab connection refused ssh port 22 and 443 Git 问题:“ssh:连接到主机 gitlab 端口 22:连接被拒绝” - Problem with Git: "ssh: connect to host gitlab port 22: connection refused" ssh:连接到主机heroku端口22:连接被拒绝 - ssh: connect to host heroku port 22: Connection refused 如何解决这个问题? ssh:连接到主机 github.com 端口 22:连接超时致命 - How to solve this? ssh: connect to host github.com port 22: Connection timed out fatal npm 安装错误:ssh:连接到主机 github.com 端口 22:连接超时 - npm install error: ssh: connect to host github.com port 22: Connection timed out ssh:连接到主机 github.com 端口 22:连接超时 - ssh: connect to host github.com port 22: Connection timed out ssh:连接到主机 gitlab.kpit.com 端口 22:连接被拒绝致命:无法从远程存储库读取 - ssh: connect to host gitlab.kpit.com port 22: Connection refused fatal: Could not read from remote repository 无法连接到 github.com 端口 443:终端 MacBook 中的连接被拒绝 - Failed to connect to github.com port 443: Connection refused in terminal MacBook 无法连接到github.com端口443:连接被拒绝,无法启动,话语Docker - Failed to connect to github.com port 443: Connection refused, Failed to Bootstrap, Discourse Docker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM