Plesk

Unable to connect to the Plesk server via SFTP: Received unexpected end-of-file from SFTP server

Symptoms

Unable to connect to SFTP. The following error is shown in an FTP client:

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

  1. Connect to the server via SSH

  2. Replace the necessary value:

    # for i in $(grep Subsystem /etc/ssh/sshd_config | awk '{print $3}'); do sed -i 's|'"$i"'|external-sftp|g' /etc/ssh/sshd_config; done

  3. Reload the SSHD service:

    # service sshd reload

Exit mobile version