Setting up a chroot environment for SFTP users
Secure File Transfer Protocol (SFTP) is a great tool for performing secure file transfers. There is a command-line client, but users will most likely use a graphical client, such as FileZilla. With a default SSH setup, anyone who has a user account on a Linux machine can log in through either SSH or SFTP and can navigate through the server’s entire filesystem. What we really want for SFTP users is to prevent them from logging into a command prompt via SSH, and to confine them to their own designated directories.
One good use for this trick would be to set up SFTP configurations for website creators. Instead of allowing these users to transfer files to and from their own home directories, just allow them to transfer files to and from the website content directories, instead.
Creating a group and configuring the sshd_config file
With the exception of the slight difference in user creation commands, this procedure...