Fix: SSH_EXCHANGE_IDENTIFICATION Read Connection Reset by Peer

Fortuitously, there is a setting called ssh exchange identity: read: It’s not common to get a connection reset by peer problem when using ssh to log into a Unix server, but it can happen.

You may ssh into Arch, Fedora, or CentOS from the macOS terminal, or use cygwin on Windows to access Ubuntu. Any time the remote server restarts the connection without your knowledge, this error can occur, as ssh is used by every Unix and Linux distribution.

SSH_EXCHANGE_IDENTIFICATION Read Connection Reset by Peer

Method 1: Modifying SSH’s Settings And Preferences

If you still can’t access the remote server after using the previous procedure and installing the update, you can try deleting your old ssh configuration files to see if it solves the problem.

If it doesn’t, try connecting again after adding the -v option to ssh. If you continue to receive an error message, try running ssh with the -c aes256-ctr option. In turn, this should reduce the length of the cypher list and allow you to establish an ssh connection to the target server.

The fact that some server hardware is preconfigured to expect reduced packet sizes has been cited by several users as making this feature especially helpful when troubleshooting Cisco-branded equipment. To use aes256-ctr encryption, simply append -c aes256-ctr to your regular ssh command.

Method 2: Getting Around Inadvertent Blocks on IP

If you have tried to log in previously but were unsuccessful, it is possible that your server has mistaken your IP address for one that is not authorised. This typically occurs if you repeatedly retry the connection while debugging; this is a reasonable answer, but it may appear as an attack to the fail2ban function.

Launch sudo iptables -L -line-number from the remote connect to check your IP address and make sure this isn’t the case. As a general rule, you can safely disregard any number of connections that don’t seem to go anywhere. Thanks For Read Our Article SSH_EXCHANGE_IDENTIFICATION Read Connection Reset by Peer.