1
votes

I'm connecting to an AWS EC2 private instance (has Private DNS and IP, no Public DNS nor IP). I do it the following way:

  1. Agent forwarding: ssh-add private-instance.pem
  2. Connect to bastion: ssh my-project.prd

    .ssh/config

enter image description here

  1. connect to private instance: ssh ubuntu@private-ip-num

Connection to instance works fine, but whenever I try to install a package:

git clone https://github.com/aws/efs-utils

I get an error like the following:

fatal: unable to access 'https://github.com/aws/efs-utils/': Failed to connect to github.com port 443: Connection timed out
1
https://github.com/aws/efs-utils This would cause git to connect through https rather than ssh. Your ssh setup would be irrelevant because git isn't using ssh. Is this your intention? Do you want git to connect through ssh or https?Kenster
don't get your point @Kenster. I'm connecting to the instance using ssh. Once i'm there i want to clone a github repo (into the instance) using git clone.ntonnelier
I'm facing the same issue today. I've been using git over https for months on this instance until it stopped working today. It seems like the NAT IP is beeing blocked/throttled by Github as it seems to be connecting some times but is very slow.sirfz

1 Answers

0
votes

Did you opened the port 443 ? you will be need to connect from your private instance to a external service the port open