I'm trying to setup SFTP on my ubuntu server and I'm encountering a problem. When I set up a group in sshd_config file to chroot people to their home directories the user in the group cannot access the server via SSH and this error comes up "software caused connection abort" and sometimes "No directory found".
I'm pretty sure it is to do with permissions but I'm not sure what. I've disabled the UFW for testing so it isn't that. Any help would be gratefully appreciated. Thanks.
Here's what I added to the sshd_config file:
Match Group webadmins
ChrootDirectory %h
X11Forwarding no
AllowTopForwarding no
I left these bottom two commented as I'm just concerned about the ChrootDirectory.
webadmins
, you will only be able to use SFTP. As for setting up a shell, something like http://askubuntu.com/questions/93411/simple-easy-way-to-jail-users. – muru Apr 17 '15 at 15:46Match Group webadmins User *,!<your-username>
should do exclude you from that match block. – muru Apr 17 '15 at 15:53*,
isn't needed. – muru Apr 17 '15 at 16:16ForceCommand
as noted above. – muru Apr 17 '15 at 16:52