tombaugh
Posts: 4
Joined: Thu Jul 26, 2012 11:06 am

SSH connection reset

Thu Jul 26, 2012 11:12 am

Hi all, I'm trying to SSH into my Raspbian Pi, but I only get this far:

Code: Select all

~ $ ssh -v pi@192.168.0.150
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.0.150 [192.168.0.150] port 22.
debug1: Connection established.
debug1: identity file /home/pieter/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/pieter/.ssh/id_rsa-cert type -1
debug1: identity file /home/pieter/.ssh/id_dsa type -1
debug1: identity file /home/pieter/.ssh/id_dsa-cert type -1
debug1: identity file /home/pieter/.ssh/id_ecdsa type -1
debug1: identity file /home/pieter/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-2
debug1: match: OpenSSH_6.0p1 Debian-2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-7ubuntu1
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
Any thoughts on how to proceed here? Thanks!

tombaugh
Posts: 4
Joined: Thu Jul 26, 2012 11:06 am

Re: SSH connection reset

Thu Jul 26, 2012 1:26 pm

The problem was solved by regenerating the host keys in /etc/ssh, which were empty before.

adamn
Posts: 1
Joined: Thu Jul 26, 2012 2:04 pm

Re: SSH connection reset

Thu Jul 26, 2012 2:06 pm

I'm getting the same problem. How do you go about regenerating the host keys?

CandidFrame
Posts: 1
Joined: Mon Aug 29, 2016 7:20 pm

Re: SSH connection reset

Mon Aug 29, 2016 7:22 pm

I have run into the same problem today.

Does anybody know whether there is a solution without having to reinstall the OS? Is there a way to still be able to remotely connect to the raspberry pi?

romanhosek
Posts: 1
Joined: Wed May 02, 2018 11:17 am
Contact: Website Twitter

Re: SSH connection reset

Wed May 02, 2018 11:23 am

CandidFrame,
this helped me - remove empty certificates and generate new ones

Code: Select all

rpi $ sudo rm /etc/ssh/ssh_host_*
rpi $ sudo dpkg-reconfigure openssh-server
(for me I had to switch to su for reconfiguration command)

Return to “Troubleshooting”