HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   HOWTO-Related Questions (
-   -   Chrooted SSH/SFTP Screen problems (

nicho12 24th May 2008 22:09

Chrooted SSH/SFTP Screen problems
I followed the guide @

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.


nicho12 26th May 2008 03:01

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 :)

falko 26th May 2008 17:07

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

nicho12 26th May 2008 23:46

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

falko 27th May 2008 19:13

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

nicho12 31st May 2008 12:37

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):

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 :)

All times are GMT +2. The time now is 04:31.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.