Setting up chroot for SFTP

James Noble noblejames at gmail.com
Wed Jun 27 07:27:21 MDT 2012


I need to setup SFTP and have the new users be locked into their own
directory.  I am running CentOS release 5.8 (Final) and have the updated
(according to Yum) version of openSSH openssh-4.3p2-82.el5.i386

According to
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=22588 as of openssh
version 4.3p2-36.el5 chroot is available.

Everything I have seen on setting up chroot has me use Match group
directive inside sshd_config.  When I put that in and restart sshd I get
the following error. "Bad configuration option: Match"  I believe that is
because that directive isn't supported until openssh version 4.8.  I was
wondering if anyone knows of a tutorial I can look at for configuring
chroot using the version of openssh that I have.

I am not opposed to updating openssh to the current version 6.0p1.  I have
downloaded the RPM and built it without any changes other than
# Do we want to disable building of x11-askpass? (1=yes 0=no)
%define no_x11_askpass 1

# Do we want to disable building of gnome-askpass? (1=yes 0=no)
%define no_gnome_askpass 1


When I try to install openssh I get the following error.
error: Failed dependencies:
openssh = 4.3p2-82.el5 is needed by (installed)
openssh-askpass-4.3p2-82.el5.i386

I am not sure how to get past either of these errors.  If anyone has
experience with either of these problems I would appreciate being pointed
in the correct direction.


More information about the PLUG mailing list