Plesk for Linux
kb: technical
Applicable to:
- Plesk for Linux
Symptoms
Unable to connect to SFTP. The following error is shown in an FTP client:
CONFIG_TEXT: Received unexpected end-of-file from SFTP server
Cause
Incorrect value of the Subsystem parameter in the SSH configuration:
# grep Subsystem /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
Resolution
-
Connect to the server via SSH
-
Replace the necessary value:
# for i in $(grep Subsystem /etc/ssh/sshd_config | awk '{print $3}'); do sed -i 's|'"$i"'|internal-sftp|g' /etc/ssh/sshd_config; done
-
Reload the SSHD service:
# service sshd reload
Comments
2 comments
Step 2 of the resolution returns an error, "-bash: syntax error near unexpected token `do'"
Please share the expected output of Resolution Step 2. Then, we can just edit the file directly.
wrong solutions for chrotted
Please sign in to leave a comment.