From: laredotornado on
Hi,

I'm using Mac 10.5.6. I awnt to set up my local host so that a
particular user is "jailed" to a certain directory when he logs in
through SSH or SFTP. So I added this to my /private/etc/sshd_config
file:

Subsystem sftp /usr/libexec/sftp-server

Match User j2ee-app
ChrootDirectory /Users/j2ee-app
AllowTCPForwarding no
X11Forwarding no
ForceCommand /usr/libexec/sftp-server

Sadly, after I restart the SSH daemon using

sudo /sbin/service ssh stop
sudo /sbin/service ssh start

and then try to SSH to my localhost as that user, I get a connection
closed message ...

ocho:~ dalvarado$ ssh j2ee-app(a)localhost
Connection to localhost closed by remote host.
Connection to localhost closed

Same result for SFTP. If I remove the above lines and restart, I can
ssh in just fine. Anyway, do you know what I'm doing wrong? Thanks,
- Dave