Virtual SSH Hosting
I am in the process of attempting to setup a system that will act as a remote fileserver for guys out in the field. I want to use something like SftpDrive to a linux server that will contain the files.
I want to use virtual user hosting (perferably through MySQL for ease of management). However, I also want to use chroot() to ensure that they only have access to a specific directory. I also do not want them to have a valid shell (so they cannot use putty.exe or something to login).
I contemplated using PAM with the pam_mysql and pam_chroot. If I have to, I will roll my own pam module, but I was wondering if there was something out there that already does this? Basically gets the username, password and 'home directory' for a user and locks them into it for a SSH session?
Also, what would my /etc/pam.d/sshd look like?
This doesn't seem to far fetched, so Im assuming its been done somewhere. Thanks for any input.