Unable to Connecting to Amazon instance EC2


I’m Using AWS – Amazon Web Services and running commands from MAC Terminal


But I am getting this error :

Gateway Timeout: can’t connect to remote host

I’m unable to access the site anymore because of this error
there is a security group applied to this instance
and port 22 for ssh is listed under this security group


Check the security group for this instance and try telnet IP <allow inbound port> . If the telnet is happening on any of these ports this means connectivity is there.

Now comes ssh, by default ssh is on port 22, which as per you already allowed in security group. So you need to check if anyone has changed the sshd_config file and changed the ports?

Leave a Reply