I have an ec2 instance on AWS that has an EIP associated and is accessible via SSH (usually). Not sure what changed between yesterday and today but now I cant SSH into the server directly from my PC. This is what happens:
When I SSH to the server (say foo), I get:
debug1: Connecting to foo [10.0.0.55] port 22. debug1: connect to address 10.0.0.55 port 22: Connection refused ssh: connect to host foo port 22: Connection refused
When I run host foo, it resolves to the correct EIP and domain:
foo.bar.net has address 34.204.x.x
I know one solution is to either add an entry into /etc/hosts or to adjust my ~/.ssh/config and add the .bar.net to the host's entry. I don't want to do either or. My question is, what can I do aside from these two solutions to make sure that SSH points to the EIP instead of it's internal IP? Just an FYI, my PC I am using is Mac OSX.