Guys,
I'm facing a weird problem while trying to setup Chroot SFTP on ubuntu server. SSH is getting crashed whenever I am trying to setup Chroot SFTP. Logs are not showing any error. The only error in logs was related to LOCALE environment and I had fixed now. This error does not seem to be related to chroot. In short I'm clueless. I had tried the following steps.
1. Created new user for SFTP
2. Commented the existing "Subsystem sftp" and added the following.
Subsystem sftp internal-sftp
3. Added the following lines for user.
Match User sftpuser
ChrootDirectory /home
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
4, Set permissions for sftp directory to root.user
5. Restarted ssh and its down.
I had tried commenting the "UserPam" in ssh config as well. This is the same for ubuntu 11 and ubuntu 12. Can anyone share some ideas?
Regards,
Asv.
Thanks.
Yes I'm aware that chroot is relative to users home directory.
I will try sudo /usr/sbin/sshd -D and let you know.
Thank you.