Searched the web for quite some time and still can't find a solution.

Is it even possible at all to restrict ssh user to a single directory in 10.11? I have set up an user account via System Preferences Users & Groups. Under Advanced Options I specified a home directory. This is the highest level directory he can go.

Followed some instruction to modify ssh/sshd_config to include:

Match User ftpuser
  ChrootDirectory <the directory path>
  PermitTunnel no
  AllowAgentForwarding no
  AllowTcpForwarding no
  X11Forwarding no

but it doesn't work.

  • What is wrong with my answer?
    – Jakuje
    Apr 8, 2016 at 7:08

1 Answer 1


You need to make sure that the <the directory path> fulfils the next requirement specified in the manual pages for sshd_config(8):

All components of the pathname must be root-owned directories that are not writable by any other user or group.

If you don't, then

it doesn't work.

But you are certainly notified about the problem in system log.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .