Hestiacp sftp error

12 April 2025

sudo sed -i '/^Subsystem sftp /d' /etc/ssh/sshd_config && echo 'Subsystem sftp internal-sftp' | sudo tee -a /etc/ssh/sshd_config && sudo systemctl restart ssh
 

The command sudo sed -i '/^subsystem sftp /d' /etc/ssh/sshd_config is intended to remove any lines starting with "Subsystem sftp" from the /etc/ssh/sshd_config file. This command uses sudo to gain root privileges, allowing it to edit the configuration file, which typically requires administrative permissions.

To execute this command, you would need to open a terminal and run it with sudo. Ensure you understand the implications of modifying the SSH daemon configuration, as incorrect changes can affect your system's ability to handle SSH connections.

Here is a breakdown of the command:

  • sudo: Runs the following command with superuser privileges.
  • sed -i: Edits the file in place.
  • '/^subsystem sftp /d': This sed expression deletes lines that start with "Subsystem sftp".

After making changes to the SSH configuration file, you should restart the SSH service to apply the changes. On most systems, you can do this with sudo systemctl restart sshd or sudo service ssh restart, depending on your distribution.

 

WIll it stick??


 

Tags

Blog Categories