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!

已提问 1 年前2512 查看次数
1 回答
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
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则