I not only want to transmit files via sftp, but also want to log in via ssh.
Here is what I changed in sshd_config
Match Group ssh_jail
ChrootDirectory /mnt/chroot
I have mounted /mnt/chroot/dev, /mnt/chroot/dev/pts, /mnt/chroot/proc, /mnt/chroot/sys I have also copied bash to /mnt/chroot/bin and some lib files to /mnt/chroot/lib64
But I cannot log in via ssh. Below is what I found in /var/log/secure
Accepted password for xxx from ::1 port 53069 ssh2
pam_unix(sshd:session): session opened for user xxx by (uid=0)
error: mm_receive_fd: no message header
fatal: mm_pty_allocate: receive fds failed
pam_unix(sshd:session): session closed for user xxxx
Why is that?