1

I am unable to connect with my Pi on ssh, with the following error returned:

FAIL: Read from socket failed

I do not have a screen to connect to the Pi. Can I fix this problem by editing data on the SD card on my PC? The OS is Raspbian, and the model is a Raspberry Pi B.

Here is the debug log:

[SSH] OpenSSH_5.6, OpenSSL 1.0.0a 1 Jun 2010 cancel)...

[SSH] debug:
[SSH] Connecting to 192.168.0.105 [192.168.0.105] port 22.

[SSH] debug:
[SSH] successful connection (select got writefds).

[SSH] debug:
[SSH] Connection established.

[SSH] debug:
[SSH] permanently_set_uid: 0/0

[SSH] debug:
[SSH] Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4+deb7u1

[SSH] debug:
[SSH] match: OpenSSH_6.0p1 Debian-4+deb7u1 pat OpenSSH*

[SSH] debug:
[SSH] Enabling compatibility mode for protocol 2.0

[SSH] debug:
[SSH] Local version string SSH-2.0-OpenSSH_5.6

[SSH] Server Version OpenSSH_6.0p1 Debian-4+deb7u1
[SSH] debug:
[SSH] packet_start[20]

[SSH] debug:
[SSH] send: len 904 (includes padlen 4)

[SSH] debug:
[SSH] packet_send done

[SSH] debug:
[SSH] SSH2_MSG_KEXINIT sent

[SSH] debug:
[SSH] packet_read()

[SSH] FAIL: Connection closed by 192.168.0.105
[SSH] debug:
[SSH] dev_main Unnormal end of SSHThread (longjmp was triggered)

[SSH] debug:
[SSH] platform_shutdown(576, 2)

[SSH] debug:
[SSH] platform_close 576

[SSH] INFO: DISCONNECT

After updating the OpenSSH server, here is the new event log:

OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.105 [192.168.0.105] port 22.
debug1: Connection established.
debug1: identity file /home/me/.ssh/id_rsa type -1
debug1: identity file /home/me/.ssh/id_rsa-cert type -1
debug1: identity file /home/me/.ssh/id_dsa type -1
debug1: identity file /home/me/.ssh/id_dsa-cert type -1
debug1: identity file /home/me/.ssh/id_ecdsa type -1
debug1: identity file /home/me/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-   4+deb7u1
debug1: match: OpenSSH_6.0p1 Debian-4+deb7u1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
2

One possible cause of "ssh negotiation succeeds but login immediately dies" is that the file system is 100% full.

Can you mount the SD card on another machine and check for a filled up Linux partition? The most common cause is huge log files in /var/log; delete some.

  • First thing that came to my mind also! A classic. UPDATE: But then I read that he updated the SSH server, so probably his fs is not full. – EDP Oct 10 '15 at 1:58
1

The first line says that you are using the OpenSSH client v5.6.

[SSH] OpenSSH_5.6, OpenSSL 1.0.0a 1 Jun 2010 cancel)...

But your RPi seems to run the OpenSSH daemon v6.0.

[SSH] Remote protocol version 2.0, remote software version OpenSSH_6.0 p1 Debian-4+deb7u1

I don't know the compatibility version chart between OpenSSH servers and clients, but I think that updating your OpenSSH client (from your desktop, laptop, or whatever) should resolve your problem.

  • ive just got another event log and edited a post – Undrooleek Sep 25 '14 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.