【发布时间】:2018-12-17 03:57:08
【问题描述】:
我正在连接到 AWS EC2 私有实例(具有私有 DNS 和 IP,没有公共 DNS 或 IP)。我这样做的方式如下:
- 代理转发:ssh-add private-instance.pem
-
连接到堡垒:ssh my-project.prd
.ssh/config
- 连接私有实例:ssh ubuntu@private-ip-num
与实例的连接工作正常,但每当我尝试安装软件包时:
git clone https://github.com/aws/efs-utils
我收到如下错误:
fatal: unable to access 'https://github.com/aws/efs-utils/': Failed to connect to github.com port 443: Connection timed out
【问题讨论】:
-
https://github.com/aws/efs-utils这将导致 git 通过 https 而不是 ssh 进行连接。您的 ssh 设置将无关紧要,因为 git 不使用 ssh。这是你的意图吗?你想让 git 通过 ssh 还是 https 连接? -
不要明白你的意思@Kenster。我正在使用 ssh 连接到实例。一旦我在那里,我想使用 git clone 克隆一个 github repo(到实例中)。
-
我今天面临同样的问题。我已经在这个实例上使用 git over https 几个月了,直到它今天停止工作。 NAT IP 似乎被 Github 阻止/限制,因为它似乎连接了一些时间,但速度很慢。
标签: amazon-web-services amazon-ec2 ssh aws-vpc