0

Today my IP address changed. Due to this my ubuntu server has locked me out. When I try to access the server via SSH, I am presented with the follow error:

ssh_exchange_identification: read: Connection reset by peer

I presume this is down to my new IP address not appearing on the hosts.allow list and therefore being blocked.

How can I regain access? It is a remote amazon EC2 server. Will rebooting help?

sebix
  • 4,175
  • 2
  • 25
  • 45
richelliot
  • 127
  • 6

1 Answers1

2

If AWS security group is denying access request then :

1.Check security group assigned to that instance on AWS console for port 22 and update your new IP there.

You can edit that rule and update your new IP in allow from.

Rebooting might not help you in this case.

Hope this helps else we can debug further.

Sachin Singh
  • 171
  • 1
  • 8
  • The AWS security group has been updated but the problem still exists. Im pretty sure its either a fail2ban or hosts.deny issue. – richelliot Jul 29 '16 at 09:41
  • 1
    ohh..Is it your production server?.below is a study case to recover your instance. https://aws.amazon.com/articles/5213606968661598 or see if you can manage to get your old public ip again((if possible)) for a while and update fail2ban or denyhosts setting. – Sachin Singh Jul 29 '16 at 10:15