I am attempting to set up an sftp server on ubuntu/precise on EC2. I have been successful in adding a new user that can connect via ssh, however once I add the following clause:
Match Group sftp
ChrootDirectory /home/%u
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
I can no longer connect (at all, ssh or otherwise) and I get the message
Error: Connection refused
Error: Could not connect to server
I am able to connect with the subsystem set to:
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp
Any idea why the ssh server is failing with this "Match" clause? Essentially, everything is working except for the "chroot" part.