I would like to setup a SFTP with chroot (or equivalent) login to my Centos 5.4 server in a clean way. By clean way I mean by using only the YUM command if possible and with something easy to maintain and easy to extend (for example an easy way to add an extra SFTP user).
The problem with CentOS 5.4 is that OpenSSH is at version 4.3 in the repository so it is not possible to use the built in chroot capabilities of OpenSSH 4.8+.
Installing RSSH required to create manually a chrooted directory which don't seems easy to maintain to me.
MySecureShell is an other solution but it require an higher version of openSSL than the one which is in the repository.
I know that I could install manually an higher version of OpenSSH but I would lose all the advantage of the Yum command and it could become tricky to maintain if I want to do some updates in the futur...
Do you have an easy and clean way to setup a chrooted SFTP login on a centOS 5.4 server?
Thanks!
I've found the following solution: