如何解决端口22连接超时 [英] how to resolve port 22 connection timeout

查看:34
本文介绍了如何解决端口22连接超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ssh: connect to host bitbucket.org port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我的防火墙已禁用,但连接仍超时。我该怎么办?

ssh

看起来您的默认推荐答案端口有问题,使用其他端口可以避免这些问题。这是常见问题。

基本上,您可以使用端口443而不是22。

  • 对于Github,答案是:
要在ssh配置中设置此设置,请编辑~/.ssh/config中的文件,然后 添加此部分:

Host github.com
    Hostname ssh.github.com
    Port 443
  • BitBucket:下面的回答确认您即使在2011年6月15日停产,仍然可以继续:

     Host bitbucket.org
      Hostname  altssh.bitbucket.org
      Port  443
    
  • 对于GitLab,ssh配置如下所示。更新IdentityFile以匹配您的本地私钥:

     Host gitlab.com
         Hostname altssh.gitlab.com
         User git
         Port 443
         PreferredAuthentications publickey
         IdentityFile ~/.ssh/gitlab
    

来源:

这篇关于如何解决端口22连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆