SFTP CONFIG :::

mkdir -p /user/LEMP/www/website.com

groupadd sftp_users

useradd -g sftp_users -d /user/LEMP/www/website.com/ -s /sbin/nologin newuser

passwd newuser

chown root:root /user/LEMP/www

cd /user/LEMP/www/

chown root:sftp_users website.com

chmod g+w website.com

chown root: www/

chmod u=rwx,g=rx,o=rx www/

cd www/

chgrp sftp_users website.com

chmod u=rwx,g=rwxs,o=rx website.com/

vi /etc/ssh/sshd_config
Port 21

Match Group sftp_users
ChrootDirectory /user/LEMP/www/
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp -d website.com

/etc/init.d/ssh restart