Allow SFTP but disallow SSH?
Starting with version 4.9 OpenSSH (not available in centos 5.x but ChrootDirectory feature was backported) has an internal-sftp subsystem: Subsystem sftp internal-sftp And then block other uses: Match group sftponly ChrootDirectory /upload/%u X11Forwarding no AllowTcpForwarding no AllowAgentForwarding no ForceCommand internal-sftp Add your users to the sftponly group. The chroot directory must be owned by root, … Read more