Contents
How do I block SFTP?
2. Login as root (or su to root from the current user). 3. To disable SFTP access, edit the file /etc/ssh/sshd_config, commenting out the Subsystem SFTP line by prepending a pound sign (#) to it.
How do I restrict SFTP users home directory in Linux?
The simplest way to do this, is to create a chrooted jail environment for SFTP access. This method is same for all Unix/Linux operating systems. Using chrooted environment, we can restrict users either to their home directory or to a specific directory.