Bebelus
Posts: 3
Joined: Fri May 17, 2013 8:40 pm

SSH connection fails to Pi

Fri May 17, 2013 9:03 pm

Hello,

I am trying to ssh to my rpi, but I get the error "Write failed: Broken pipe" right after entering the password.
I tried to set both "ServerAliveInterval 60" in the client's /etc/ssh/ssh_config and "ClientIntervalAlive 60" in the rpi's sshd_config, but I still get the same messgae, right after giving the password.

Thank you for your help,
Bebelus

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: SSH connection fails to Pi

Fri May 17, 2013 9:18 pm

To clarify matters - what O.S. image/version are you running on the Pi? How and from what are you ssh'ing from. (For example I use a PuTTy client running on a netbook under Ubuntu or Windows XP to ssh into several Pi's running Wheezy Raspbian. I can also ssh from Pi to Pi. This hasn't required any special configuration/setup and, so far, has always "just worked").
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Bebelus
Posts: 3
Joined: Fri May 17, 2013 8:40 pm

Re: SSH connection fails to Pi

Fri May 17, 2013 9:42 pm

Hello,

I use the rpi image 3.6.11 and I try to connect from a Ubuntu 12.04 Precise Pangolin.

Activating the -vvv option inssh I get the following errors:
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Write failed: Broken pipe

Thx,
Bebelus

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: SSH connection fails to Pi

Fri May 17, 2013 10:07 pm

Bebelus wrote:Hello,

I use the rpi image 3.6.11 and I try to connect from a Ubuntu 12.04 Precise Pangolin.

Activating the -vvv option inssh I get the following errors:
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Write failed: Broken pipe

Thx,
Bebelus
Hi Bebelus,
It looks as if we're using similar setups, except that I usually use PuTTy rather than manually ssh'ing from a terminal.
If I do the latter w/o the -vvv option I get:

Code: Select all

trevor@BlueElf:~$ ssh -l pi 192.168.23.49
The authenticity of host '192.168.23.49 (192.168.23.49)' can't be established.
ECDSA key fingerprint is 40:6d:f0:d8:fc:d7:34:3f:12:cf:b1:2a:13:c7:f8:dd.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.23.49' (ECDSA) to the list of known hosts.
pi@192.168.23.49's password: 
Linux raspigrey 3.6.11+ #401 PREEMPT Fri Mar 29 22:59:09 GMT 2013 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri May 17 22:48:20 2013 from 192.168.23.237
Loading bash aliases ...
... done.
and with the -vvv option (first dozen or so lines):

Code: Select all

trevor@BlueElf:~$ ssh -l pi 192.168.23.49 -vvv
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
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.23.49 [192.168.23.49] port 22.
debug1: Connection established.
debug1: identity file /home/trevor/.ssh/id_rsa type -1
debug1: identity file /home/trevor/.ssh/id_rsa-cert type -1
debug1: identity file /home/trevor/.ssh/id_dsa type -1
debug1: identity file /home/trevor/.ssh/id_dsa-cert type -1
debug1: identity file /home/trevor/.ssh/id_ecdsa type -1
debug1: identity file /home/trevor/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3
debug1: match: OpenSSH_6.0p1 Debian-3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "192.168.23.49" from file "/home/trevor/.ssh/known_hosts"
This suggests that the issue is with ssh on your Ubuntu box rather than the Pi. It might be worth uninstalling OpenSSH etc. and re-installing it and/or updating.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Bebelus
Posts: 3
Joined: Fri May 17, 2013 8:40 pm

Re: SSH connection fails to Pi

Sat May 18, 2013 6:55 am

Hello,

I burned a wheezy image on another flash card and now it works... The previous flash card seems to have some HW issues that causes the SSH to fails (?).

Thank you for your support,
Bebelus

harshadura
Posts: 1
Joined: Sat May 18, 2013 11:51 am

Re: SSH connection fails to Pi

Sat May 18, 2013 11:52 am

cheers! ;)

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: SSH connection fails to Pi

Sat May 18, 2013 12:28 pm

Bebelus wrote:Hello,

I burned a wheezy image on another flash card and now it works... The previous flash card seems to have some HW issues that causes the SSH to fails (?).

Thank you for your support,
Bebelus
Good to see that things are working now :) . This was an "odd one" :roll:
Cheers, Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “Troubleshooting”