SSH/SFTP: Create and Restrict a User to his Home Directory on a Ubuntu Server
This is a step by step guide to create a new user and restrict the user to his home directory. 1. Create a new user sudo adduser TestUser 2. Change the ownership of TestUser’s home directory to root. sudo chown root:root /home/TestUser 3. Edit the ssh config file sudo vim /etc/ssh/sshd_config and