AWS EC2 instance SSH Connection timed out for port 22

In this post I'll describe one of the connectivity issue that I faced while working with AWS EC2 instance. Below is the problem summary, cause and solution. Let's get started... Problem I have created an EC2 Ubuntu Linux instance and configured the same my own. However, I have installed some container application on the same but during the work all of a sudden the SSH connection lost. Now, when I tried to get the connection again , it says- ssh -L 5901:localhost:5901 -I ssh-key.pem ubuntu@ec2-13-xxx-xxx-139.ap-south-1.compute.amazonaws.com connection timeout for port 22 Cause There could be multiple reasons of the same like, inbound rule changes for port 22, firewall turned on, Security group changes etc. In my case it was 'firewall turned on'. Solution So how should I go to turn off the firewall without native ssh connection which I do over terminal/putty? The answer is through other was utilities like- Browser based SSH...