Hi,

You might try a looking at Match in the sshd_config man pages, ChrootDirectory.

Something like this in sshd_config, home directories must be root owned if
chrooted. This is in Openssh v5.1, not sure when it was introduced.

ChrootDirectory %h

Subsystem       sftp    internal-sftp

Match group wheel
ChrootDirectory none

This defaults to chroot to the home directory, unless users are in the group
wheel, you can do this the other way around default is not to chroot, users in a
specific group are chrooted.

Regards

Nigel Taylor

Jean-Francois wrote:
> Hello,
> 
> If I understand this will chroot any user. Am I correct ?
> - Is root chrroted as well ?
> - Is it possible to chrrot only some users ?
> 
> I am afraid that is I do this then all users will be chrooted and I
> won't be able to turn this back since I will not have access to /etc.
> 
> Line to be changed in sshd_config :
> #ChrootDirectory none
> 
> Thanks
> JF
> 
> Le lundi 23 fC)vrier 2009 C  19:07 +0100, Floor Terra a C)crit :
>> See sshd_config(5) and search for ChrootDirectory.
>>
>> Floor
>>
>>         On Feb 23, 2009 6:24 PM, "Jean-Francois"
>>         <jfsimon1...@gmail.com> wrote:
>>         
>>         Hi All,
>>         
>>         As far as I understand, the sftp service is always running
>>         since it is
>>         the ssh daemon (maybe one can correct me if I'm wrong).
>>         Hence I need to chroot some users to specific directories.
>>         I prefer not to use vsftp at present time if this feature is
>>         available
>>         with sftp of OpenBSD.
>>         
>>         One can help me ?
>>         
>>         Thank you;
>>         JF

Reply via email to