Monthly Archives: November 2015

SSH: packet_write_wait: Broken pipe

SSH won’t establish connection for specific user.

pdeneef@semarang:~# ssh -vvv user@hostname
OpenSSH_6.9p1, LibreSSL 2.1.7
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
..
..
Authenticated to hostname ([ip.add.re.s]:22).
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.
packet_write_wait: Connection to ip.add.re.s: Broken pipe

Resolution:
Remove and recreate user

 $ userdel -r username
$ useradd username
$ passwd username

Retry eting up SSH connection:


pdeneef@semarang:~# ssh user@hostname
user@hostname's password: 
Last failed login: Fri Nov  6 00:42:53 CET 2015 from fromhostname on ssh:notty
There were 2 failed login attempts since the last successful login.
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
[jforces@one ~]$