Limit user to chrooted SFTP access

If you would like to give a user sftp only access and have him chrooted in his own home dir, this is what does the trick: This has been tested on an Ubuntu 12.04 LTS system. Add the user as you normally would. Then you need to change the users default shell # usermod -s /usr/lib/sftp-server # echo ‚/usr/lib/sftp-server‘ >> …