error: subsystem: cannot stat /usr/libexec/openssh/sftp-server: No such file or directory
subsystem request for sftp failed, subsystem not found

Date: 03-07-2021

When i try to connect server via sftp, i get above error. Follow the below steps to solve the error.

Step 1: Login to the server via ssh terminal.

Step 2: You need to make some changes in the SSHD configuration file by using below command.
# sudo vi /etc/ssh/sshd_config

Enter "Subsystem sftp internal-sftp" instead of "Subsystem sftp /usr/libexec/openssh/sftp-server"in the above config file and save and exit.

Step 3: Restart the SSH service for new changes to take effect by using below command.
# sudo systemctl restart sshd

Now you can use SFTP without error.

Thank you!

Leave a Reply