[CentOS] rssh / scponly

Gregory P. Ennis PoMec at PoMec.Net
Sun Mar 27 21:27:33 UTC 2011

> If you use sftp, it can be chroot'ed by default (see man-page).
> (In reasonably recent version of sshd)

I gather thats a sshd somewhat newer than the one included in CentOS 5 
?  the only mention of chroot in man sshd is the /var/empty/sshd dir 
used during preauthorization.

I'd be very cautious on setting this up, or you could easily lose access 
to ssh shell sessions since ssh/scp/sftp are all so tightly coupled.


Thank you for your post, I have sure not been able to find the
appropriate references in the man pages.  I am running Centos 5.5

I did try putting a copy of /etc/ssh/ssh_config
as /home/user/.ssh/config

with the addition of :

Subsystem       sftp    internal-sftp

Match User ftp
    ForceCommand internal-sftp
    ChrootDirectory /home/user

But this did not work

Any suggestions ???


More information about the CentOS mailing list