Tag Archives: error

SFTP/SSH Write failed: Broken pipe

I was trying to access via SFTP and SSH to a host, and I was getting some strange errors…
yesterday it was okay….

ssh [email protected]
[email protected]'s password:
Write failed: Broken pipe

I’v sshed with other user and changed to a root user.
Had to read the auth.log file to figure out what was going on.

root@sd-11111:/home/mike# tail -f /var/log/auth.log

So… this is what I got.

May 28 13:45:31 sd-11111 sshd[1676]: Accepted password for mike from 84.91.4.220 port 59004 ssh2
May 28 13:45:31 sd-11111 sshd[1676]: pam_unix(sshd:session): session opened for user mike by (uid=0)
May 28 13:45:31 sd-11111 systemd-logind[447]: Removed session 4.
May 28 13:45:31 sd-11111 systemd-logind[447]: New session 5 of user mike.
May 28 13:45:32 sd-11111 sshd[1694]: fatal: bad ownership or modes for chroot directory "/home/mike"
May 28 13:45:32 sd-11111 sshd[1676]: pam_unix(sshd:session): session closed for user mike

The solution was to do the following…

root@sd-11111:/home# sudo chown root:root /home/mike/
root@sd-11111:/home# sudo chmod 755 /home/mike/