groupadd sftpusers useradd --gid sftpusers --comment "<USER>" --home-dir /home/<USER> --create-home --shell /bin/bash <USER> passwd <USER> chown root:root /home/<USER> chmod g+rx /home/<USER> chmod o+rx /home/<USER>
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match Group sftpusers
X11Forwarding no
#ChrootDirectory /var/www
ChrootDirectory /home/%u
ForceCommand internal-sftp
AllowTcpForwarding no
PasswordAuthentication no
# reactivació punts montage per usuaris chrooted @reboot /home/mount-bind.sh > /dev/null 2>&1
#!/bin/bash mount --bind <PATH_LOCAL> /home/<USER>/<ENLACE>