I'm trying to SSH into a EC2 instance. It worked previously, but stopped working all of a sudden. Now, I'm getting the error port 22: Operation timed out
. My inbound security rules allow all IP addresses for SSH on port 22.
I tried creating a new instance from an image and downloading a new key, but I was still not able to SSH into it the new instance.
What could be the problem here?
My API is running on the server when I try to go to the public ip of the instance.
SOLUTION: ufw firewall did not allow ssh. Solution: Locked myself out of SSH with UFW in EC2 AWS