How do I set up an openssh SFTP server that authenticates against a MySQL table where the users are jailed? Each user will need to have its own jail:
/home/sftp/john /home/sftp/jane etc..
However this is only for the users authenticated through MySQL. These users are also not allowed to use SSH. But users authenticated through pam_unix are allowed to SSH and are not jailed.
I already found out I can do the authentication using the pam-mysql module. But how do I set a jail and disable ssh for these users, while pam_unix users will still have full ssh access.
sshd_config provides tools for chroot, but it chroots to the user's home directory. And sshd_config can disable ssh for groups. But the MySQL users don't have groups and don't have a home directory like a normal linux account.