HomePage » Linux » LinuxSecurity

chroot and ssh

Download and install jail from http://www.jmcresearch.com/projects/jail/howto.html
tar zxvf jail_1.9a.tar.gz
cd jail/src
# make changes to Makefile, specifically platform and install location. Default is Linux and /usr/local/bin
make
make install


Now create the jail environment
mkjailenv /var/chroot


Add basic programs
addjailsw /var/chroot
# The following file is not copied to chroot root, which is required by bash
cp /lib/ld-linux.so.2 (0x00b69000) /var/chroot/lib


Add other programs to chroot environment
addjailsw /var/chroot -P awk 


Now add users, first add local user, then add jail user.
useradd -d /var/chroot -s /usr/local/bin/jail prisioner
addjailuser /var/chroot /home/prisioner /bin/bash prisioner
Comments [Hide comments/form]
Well, as long as he's allowed to pay ahead in the
-- p36043-ipngn902sapod (2012-04-30 07:35:16)
You've catpuerd this perfectly. Thanks for taking
-- 188.143.232.12 (2012-05-02 20:54:44)
qUXEJ5 <a href="http://juhiynctirmz.com/&
-- wsip-70-168-250-62.o (2012-05-03 12:06:08)
k5mkU0 , [url=http://bokugajgyija.com/]bokugajgyij
-- 174.37.130.11-static (2012-05-03 18:06:18)
AO672N <a href="http://ddxndygfmvpr.com/&
-- 147.163.118.2 (2012-05-04 18:25:28)
YCCyjD , [url=http://mbswhvlvhaub.com/]mbswhvlvhau
-- fa.7.be.static.xlhos (2012-05-06 00:52:41)
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki