How Do I Block Sftp Access in Linux?
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.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest