Fix "Connection Reset by Peer" Error When Using Weaved on Your Raspberry Pi

TL;DR: Skip to the solution.

I recently purchased a Raspberry Pi 3 Model B from Fry's. The Raspberry Pi is currently one of the coolest little computers you can get, and for only $35, is a no-brainer for tinkerers like myself.

Ultimately, I decided to turn my Raspberry Pi into an always-on Plex Media Server. But before doing that, I wanted to be able to SSH into it remotely from any computer. Because I currently have a dynamically assigned IP address, I needed a solution that would update my IP dynamically to a common hostname. Granted, there are a ton of free and paid dynamic DNS services out there, but Weaved is one of the easiest and cheapest solutions. The downside to the free plan on Weaved is that you are only allowed a 30 minute connection, but that is plenty of time for my purposes.

The first thing I recommend doing is following the set-up instructions on RaspberryPi.org. Now, here is where the "tricky" part comes in. If you modified the SSH port, which I recommend you do for safety purposes, you will need to adjust the SSH port found in "/etc/ssh/sshd_config", otherwise you will encounter the error "ssh_exchange_identification: read: Connection Reset by Peer".

Solution

To do this, open "/etc/ssh/sshd_config" by using this command.

sudo nano /etc/ssh/sshd_config

Then change the port to whatever port number you assigned in the Weaved setup.

Voila, you should now be able to access your Raspberry Pi using Weaved.