SSH – Fix Broken Pipe During Connection on Fedora

fedorassh

Using fedora 24, I have ssh connection problem. I installed it on 2 laptops and have the same problem on both. When I ssh, it asks for a password during connection, but immediately writes broken pipe and kicks me out.

ssh -l myname 192.168.1.5
myname@192.168.1.5's password:
packet_write_wait: Connection to 192.168.1.5 port 22: Broken pipe

When I make it verbose, I have this:

debug1: Next authentication method: password
myname@192.168.1.5's password: 
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.5 ([192.168.1.5]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
packet_write_wait: Connection to 192.168.1.5 port 22: Broken pipe

I have no idea of how to connect, but I can connect from the same laptop to another debian laptop. I cannot connect from debian to any of those 2 Fedora computers.

I tried ssh -l myname localhost twice then ran journalctl -u sshd and this is the result:

Nov 03 17:15:09 localhost.localdomain sshd[15663]: Server listening on :: port 22.
Nov 03 17:15:09 localhost.localdomain systemd[1]: Started OpenSSH server daemon.
Nov 03 17:19:37 localhost.localdomain sshd[16025]: Accepted password for myname from 127.0.0.1 port 57942 ssh2
Nov 03 17:22:50 localhost.localdomain sshd[16086]: Accepted password for myname from 127.0.0.1 port 57996 ssh2

I don't know where to find more logs.

PS: SElinux is disabled.

I tried 2 times ssh -l myname localhost then run journalctl -u sshd and this is the result:

Nov 03 17:15:09 localhost.localdomain sshd[15663]: Server listening on :: port 22.
Nov 03 17:15:09 localhost.localdomain systemd[1]: Started OpenSSH server daemon.
Nov 03 17:19:37 localhost.localdomain sshd[16025]: Accepted password for myname from 127.0.0.1 port 57942 ssh2
Nov 03 17:22:50 localhost.localdomain sshd[16086]: Accepted password for myname from 127.0.0.1 port 57996 ssh2

Best Answer

vi /etc/ssh/sshd_config 

Change value of UsePrivilegeSeparation into yes.

I using fedora23, and I met the same with you, try my solution above, maybe it works. It looks like a problem about openssh-server-7.2p2-1.

Related Question