I have a linode and I access via ssh throw terminal.
I need to create an sftp user which his default directory (and the only he can access) is
Now, I did it, but when I try to connect I get broken pipe or connection rejected by peer
What I did is this:
$ adduser --home /var/www/xxxxxx.com/public_html/directory/ username $ chown username:username /var/www/xxxxxx.com/public_html/directory/ $ chmod 755 /var/www/xxxxxx.com/public_html/directory/ $ nano /etc/ssh/sshd_config
/etc/ssh/sshd_config I added the following lines
Match User username ChrootDirectory /var/www/xxxxxx.com/public_html/directory/ AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp
What am I doing wrong?
EDIT: This is the actual error
EDIT2: this is the error in filezilla
EDIT 3: auth.log
Oct 15 17:47:11 (none) sshd: fatal: bad ownership or modes for chroot directory "/var/www/xxxxxxxxxxxx.com/public_html/extras_html"