Can't connect to Ec2 instance: "Connection refused on port 22"

1

I have been able to successfully log into my ec2 2 times in the past. Now when I try to login, I get this error

ssh -vvv -i "test.ppk" oracle@ec2-11-162-345-000.compute-1.amazonaws.com
OpenSSH_7.1p2, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-11-162-345-000.compute-1.amazonaws.com [56.187.068.298] port 22.
debug1: connect to address 56.187.068.298 port 22: Connection refused
ssh: connect to host ec2-11-162-345-000.compute-1.amazonaws.com port 22: Connection refused

After doing some research, i believe this is because the first time i logged into the instance, I was at home. The second time, I was at someone else house. So maybe my ip address is now blocked from entering. I'm using a default security group that allows all connections so idk where to go from here.

Linux Oracle User

Posted 2017-06-06T16:51:50.277

Reputation: 21

IIRC the default firewall settings disallow all incoming(!) connections. – Daniel B – 2017-06-06T16:53:40.320

@DanielB But I was able to connect to it before and I didn't change any settings. And I just checked the inbound settings now and it is set to allow all connections – Linux Oracle User – 2017-06-06T16:59:12.627

No answers