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
3 comments
Worked like a charm ! Thank you
I get an error on step 2 when I try this.
So, I
and commented out the following line
then added
And restarted the service. SFTP is working for Plesk users.
In my case, changing it to internal-sftp worked but broke the CHROOT configuration.
The correct answer was to leave the Subsystem with the original value and instead rebuild the chroot template as described in this article https://support.plesk.com/hc/en-us/articles/115002140654
Please sign in to leave a comment.