I have a website hosted in /var/www/mydomain
I want to create a chrooted ssh account to give access to a shell to my developers to execute commands and check logs.
This is just a raw transcript how I did it with jailkit :
$ apt-get install build-essential autoconf automake libtool flex bison debhelper binutils-gold
$ cd /usr/local/src/ $ wget http://olivier.sessink.nl/jailkit/jailkit-2.17.tar.bz2 $ tar -xjvf jailkit-2.17.tar.bz2 $ cd jailkit-2.17/ $ ./debian/rules binary $ dpkg -i jailkit_2.17-1_amd64.deb $ jk_init -j /var/www/mydomain jk_lsh $ jk_init -j /var/www/mydomain sftp $ jk_init -j /var/www/mydomain scp $ jk_init -j /var/www/mydomain git $ jk_init -j /var/www/mydomain extendedshell $ jk_init -j /var/www/mydomain editors $ jk_jailuser myuser