Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can I confine my users to their /home/%u directory using simply open-ssh configuration? I did the following from what I found on the Internet Stopped the server To the sshd_config file appended the following

Match group sftpusers
    ChrootDirectory /home/%u
    X11Forwarding no
    AllowTcpForwarding no

started the server

FYI I have the users added to sftpusers group

My users can still access entire file structure on my system

Ubuntu Server 12.04 LTS with open-ssh installed

share|improve this question
1  
Is this only for sftp, or do they also need shell access? –  Zoredache Oct 4 '12 at 19:54
add comment

1 Answer

I'm using this on OpenSSH_5.3p1 and it's working:

Subsystem sftp internal-sftp
Match group sftponly
         ChrootDirectory %h
         X11Forwarding no
         AllowTcpForwarding yes
         ForceCommand internal-sftp
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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