Fix Raspbian SSH Error "Connection reset by peer"

Words
51
Reading
1 min
9y
Listen to this post
~1 min

If you set up a fresh Raspberry Pi with Raspbian and you can't connect with ssh due to:

ssh [email protected]
Read from socket failed: Connection reset by peer



Solution: Log in on your Pi. Delete and regenerate ssh server keys:

sudo rm /etc/ssh/ssh_host_* 
sudo dpkg-reconfigure openssh-server 
聽

Source: Raspberry Pi Forums