≡ Menu

Chroot in OpenSSH / SFTP Feature Added To OpenSSH

For regular user accounts, a properly configured chroot jail is a rock solid security system. I’ve already written about chrooting sftp session using rssh. According to OpenBSD journal OpenSSH devs Damien Miller and Markus Friedl have recently added a chroot security feature to openssh itself:

Unfortunately, setting up a chroot(2) environment is complicated, fragile and annoying to maintain. The most frequent reason our users have given when asking for chroot support in sshd is so they can set up file servers that limit semi-trusted users to be able to access certain files only. Because of this, we have made this particular case very easy to configure.

This commit adds a chroot(2) facility to sshd, controlled by a new sshd_config(5) option “ChrootDirectory”. This can be used to “jail” users into a limited view of the filesystem, such as their home directory, rather than letting them see the full filesystem.

Share this on:
{ 5 comments… add one }
  • Bryan February 21, 2008, 2:19 am

    Yes, this is a long time coming. You finally don’t have to jump through hoops now.

  • Bensode February 21, 2008, 2:40 pm

    Any ideas when this will get placed into production and out of CVS? Hoping that it will be available in apt sources soon.

  • Dave March 14, 2008, 4:19 am

    You mean I just did a whole upgrade to openssl, zlib, prngd, openssh, etc., and the chrootdirectory is still not in there. LOL!!! Looking forward to the release into production, and THANKYOU!!!

  • od April 9, 2008, 3:49 am

    this is awesome. thanks.

  • Webagentur November 5, 2008, 3:16 pm

    Thank you for this tutorial. That has me very helped.

Security: Are you a robot or human?

Leave a Comment

   Tagged with: , , , , , , ,