Chrooted SSH/SFTP Screen problems

Discussion in 'HOWTO-Related Questions' started by nicho12, May 24, 2008.

  1. nicho12

    nicho12 New Member

    Hello,
    I followed the guide @ http://www.howtoforge.org/chroot_ssh_sftp_debian_etch

    and setup a working chrooted shell/sftp

    I managed to add some applications by adding them into the create_chroot_env script written there, and most of them worked fine. I had to copy some lib files to get some working.

    However there is one essential application I need, screen.
    I cannot get it to work on the chrooted shell.

    The first error I had was something like:
    Error: Must be connected to a terminal.

    I somehow fixed this by mounting proc in the chroot dir and then I get the error:

    Cannot open your terminal '/dev/pts/1' - please check.

    I then mounted that also and it seemed to work and the screen window would open, but then I would get the error:
    No More PTYs


    If anyone could help me out I would be extremely greatful. It is pretty essential that screen is able to run in the chroot.

    thanks
    N
     
  2. nicho12

    nicho12 New Member

    sorry for the double post but I could really do with some help here..
    If anyone has any suggestions I am willing to try them :)
     
  3. falko

    falko Super Moderator ISPConfig Developer

    I'm sorry, but I have no idea... :(
     
  4. nicho12

    nicho12 New Member

    damn o well :(
    I will keep working on this hopefully I will find some solution!

    I do have another question tho..
    Is it possible to create super users in the jail that are chrooted to the jail?
    or if not ,is it possible to allow a user to perform sudo in the jail?

    I am wondering this becuase is it possible to compile programs specifically inside the jail so the lib etc. etc. are all written to the files inside the jailed directories.

    I hope what i said is clear :D
    N
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Haven't tried this, but it should be possible.
     
  6. nicho12

    nicho12 New Member

    Ok I found a way to get screen working

    Firstly add the relevant application path to create_chroot_env or whatever script you are using
    copy required lib files (cant be more specific, sorry)

    then you need to mount the following (this is how I got it to work):
    Code:
    mount -o bind /dev /home/chroot/dev
    mount -t proc proc /home/chroot/proc
    mount -t devpts devpts /home/chroot/dev/pts
    
    remember you will need the directories there to mount to :)
     

Share This Page