I think my question is really: How do I follow the ChrootDirectory directions here to allow interactive shell?

I have a virtual server at Linode running Ubuntu 10.04. I will be hosting a Drupal site for a friend. I'd like to give him the ability to safely use wget and tar within his directory. That's all he needs to be able to easily install themes and modules.

I've set ChrootDirectory in sshd_config. I can connect with WinSCP and it appears to be working nicely. His home directory looks like a root which I'm unable to move above. WinSCP conveniently allows Linux commands from its menu but any attempt to execute a command results in "Current SFTP-3 does not support the command you request". I guess this is because I'm really asking it to allow interactive shell. Those commands work fine without ChrootDirectory being set.

I'm no Linux expert and I haven't really found any good instructions on how to add "typically sh(1), and basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4), arandom(4) and tty(4) devices." to the ChrootDirectory.

Thanks for any helper or pointers


MAKEDEV is usually used to create device files easily. Passing it -d will allow you to specify a directory to create them in.

MAKEDEV -d /srv/ssh/chroot/dev mem null port ...

For sh just use cp -a, and ldd to see what libraries it may need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.