Set Root folder for SFTP users to home folder

Written on 20 January 2016

After this line:
Subsystem sftp /usr/lib/openssh/sftp-server Add

 Match Group sftponly
   ChrootDirectory %h
   ForceCommand internal-sftp
   AllowTcpForwarding no
   PermitTunnel no
   X11Forwarding no

Add group groupadd sftponly then add sfto user to group

usermod username -g sftponly  

Prevent ssh access , deny ssh access

sudo usermod -s /bin/false username  

Read more at:

Read more on SFTP Linux Server