chroot in debian doesnt work.

Discussion in 'HOWTO-Related Questions' started by 3molo, Oct 16, 2006.

  1. 3molo

    3molo New Member

    Hi and thanks for the guides Falko.

    I cant get the chroot patch to work although I followed your guide. Im running debian sarge/sid mix. Only difference between your installation process is that I choosed the chroot patch that matches my openssh version, and I assume this is the correct thing to do?
    I did create all the dirs, copied all the files and changed the passwd entries.
    Restarted my sshd after each change I did. also tried the suggested pam entries to be used with the patch (openssh-3.8.1p1-chroot/contrib/sshd.pam.generic).

    no result:
    test@w00t:~$ pwd

    passwd entry in both passwd files:

    ls -l /home/chroot/
    drwxr-sr-x 2 root staff 1024 Oct 14 17:47 bin
    drwxr-sr-x 2 root staff 1024 Oct 14 17:43 dev
    drwxr-sr-x 2 root staff 1024 Oct 14 17:50 etc
    drwxr-sr-x 3 root staff 1024 Oct 14 17:51 home
    drwxr-sr-x 3 root staff 1024 Oct 14 17:49 lib
    drwxr-sr-x 5 root staff 1024 Oct 14 17:47 usr

    SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.4, openssh-3.8.1p1-chroot.

    Any clue?
  2. falko

    falko Super Moderator ISPConfig Developer

    Please use the commands exactly as shown in the tutorial. You don't patch your existing SSH installation, you install a completely new SSH daemon (which has the chroot patch):

    cd /tmp
    apt-get install libpam0g-dev openssl libcrypto++-dev libssl0.9.7 libssl-dev ssh
    tar xvfz openssh-4.2p1-chroot.tar.gz
    cd openssh-4.2p1-chroot
    ./configure --exec-prefix=/usr --sysconfdir=/etc/ssh --with-pam
    make install
  3. 3molo

    3molo New Member

    oh, right.

Share This Page