I just created a new "SSH key with a pass phrase" for github private repo access from my AWS EC2 instance. Now I clone my repos fine. But the issue started that I can not access any https. It is giving me connection refused. Even the sudo apt-get update command stopped working and neither can I access AWS S3 resources from my code. It is giving me same type of error.
Can someone suggest me a solution for this problem?
Error when I am testing https site (Not sure if I am suppose to test like this)
ubuntu@ip-10-0-1-126:~$ curl -k https://www.facebook.com/ curl: (7)
Failed to connect to www.facebook.com port 443: Connection refused
Another error when I try to install a golang package.
ubuntu@ip-10-0-1-126:~$ go get -u -v github.com/Jeffail/tunny
github.com/Jeffail/tunny (download)
cd /home/ubuntu/go/src/github.com/Jeffail/tunny
git pull --ff-only fatal: unable to access 'https://github.com/Jeffail/tunny/': Failed to connect to github.com port 443: Connection refused
package github.com/Jeffail/tunny: exit status 1
ubuntu@ip-10-0-1-126:~$ go get -v gopkg.in/yaml.v2
Fetching https://gopkg.in/yaml.v2?go-get=1 https fetch failed:
Get https://gopkg.in/yaml.v2?go-get=1: dial tcp 35.196.143.184:443: connect: connection refused package gopkg.in/yaml.v2: unrecognized import path "gopkg.in/yaml.v2" (https fetch: Get https://gopkg.in/yaml.v2?go-get=1: dial tcp 35.196.143.184:443: connect: connection refused)
Output of my sudo apt-get update command:
ubuntu@ip-10-0-1-126:~$ sudo apt-get update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease Could not connect to security.ubuntu.com:80 (91.189.88.149). - connect (111: Connection refused)
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.26). - connect (111: Connection refused)
...
W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease
Unable to connect to ap-south-1.ec2.archive.ubuntu.com
...