【问题标题】:Unable to connect to gitlab, Connection timed out无法连接到gitlab,连接超时
【发布时间】:2022-01-24 06:24:50
【问题描述】:

我在 id_companyid_company.pub 下的 unbuntu 上创建了 ssh 密钥,并将配置更新为:

Host gitlab.company.com
  Hostname gitlab.company.com
  #PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_company

现在,我正在尝试使用:ssh -T git@gitlab.company.com 测试连接,但我收到了ssh: connect to host gitlab.company.com port 22: Connection timed out 我不知道是什么原因造成的,还是我做错了什么?

【问题讨论】:

  • 由于连接超时,问题似乎与网络有关。也许先尝试测试连接?远程登录 gitlab.company.com 22

标签: ssh gitlab


【解决方案1】:

首先确保您的 gitlab.company.com 服务器可以通过端口 22 访问:

curl -v telnet://gitlab.company.com:22

我知道在我的公司,永远不会授予 SSH 访问权限:仅限 HTTPS。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-27
    • 1970-01-01
    • 1970-01-01
    • 2018-12-30
    • 2019-10-18
    • 1970-01-01
    • 2018-04-22
    • 2014-12-12
    相关资源
    最近更新 更多