[英]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.