I would to like to restrict a user to certain directory(ies) but also allow to use SFTP for transfer.
I looked at the answers provided to similar questions at:
Unfortunately, the accepted answers only work on more current OpenSSH versions while my system is Centos 5.8,
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
I set up vsftpd using the following Rackspace guide: http://www.rackspace.com/knowledge_center/article/rackspace-cloud-essentials-5-centos-installing-vsftpd which works great by restricting user to their directories BUT only using ftp, it does not allow SSH (turned off shell using usermod)
I enabled sftp using the following guide: http://wiki.vpslink.com/Configuring_vsftpd_for_secure_connections_(TLS/SSL/SFTP)
Unfortunately, sftp was not allowed until I re-enabled bash shell for the user. Now sftp works, but they can leave their home directory and browse system files at will.
It is getting pretty close to shaving yaks now, so I wonder whether I should try to upgrade OpenSSH or is there another solution?