Error "Connection reset by peer" with ssh

0

I am currently experiencing an issue with SSH connections to my EC2 instance. Whenever I attempt to connect using SSH, I receive the following error message: "kex_exchange_identification: read: Connection reset by peer."

I have verified that my SSH key pair is correctly configured and the security groups allow inbound SSH traffic on port 22. However, I am still unable to establish a successful SSH connection.

I would greatly appreciate any guidance or suggestions to regain SSH access to my EC2 instances. Thanks in advance!

gefragt vor einem Jahr2510 Aufrufe
1 Antwort
0

Is it being rejected by the TCPWrapper?
You may need to review the settings in "/etc/hosts.allow" and "/etc/hosts.deny" of your EC2 instance.
In particular, you should check the file "/etc/hosts.deny".
If your IP address is listed in this file, your connection will be denied.

If SSM Agent is installed on EC2, try using Session Manager instead of SSH to connect.
https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html

profile picture
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen