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.
[email protected]:/home/mike# tail -f /var/log/auth.log
So… this is what I got.
May 28 13:45:31 sd-11111 sshd: Accepted password for mike from 184.108.40.206 port 59004 ssh2 May 28 13:45:31 sd-11111 sshd: pam_unix(sshd:session): session opened for user mike by (uid=0) May 28 13:45:31 sd-11111 systemd-logind: Removed session 4. May 28 13:45:31 sd-11111 systemd-logind: New session 5 of user mike. May 28 13:45:32 sd-11111 sshd: fatal: bad ownership or modes for chroot directory "/home/mike" May 28 13:45:32 sd-11111 sshd: pam_unix(sshd:session): session closed for user mike
The solution was to do the following…
[email protected]:/home# sudo chown root:root /home/mike/ [email protected]:/home# sudo chmod 755 /home/mike/