· 1 分钟阅读时长 · 134 字 · -阅读 -评论

title: “SSH Login Failure — Connection reset by peer” tags:

  • WebShell slug: af305b63 date: 2022-10-20 20:35:52 summary: “Troubleshooting kex_exchange_identification: read: Connection reset by peer during SSH login, with likely causes and checks.”

If SSH login fails with kex_exchange_identification: read: Connection reset by peer, try the following checks.

When using ssh, the -v flag prints debug logs. In the logs below, the server never sends anything; if the first step succeeded, you would see the remote protocol version.

https://static.1991421.cn/2022/2022-10-20-203719.jpeg

Likely places to check:

  1. /etc/ssh/sshd_config

    Verify the port is correct; it may not be 22. If you change the config, restart the service with service sshd restart.

  2. /etc/hosts.allow and /etc/hosts.deny

    By default these files are empty with no active rules; make sure nothing is blocking your client.

Note: editing the above files requires sudo or root privileges.

Alan H
Authors
开发者,数码产品爱好者,喜欢折腾,喜欢分享,喜欢开源