Articles in this section

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

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

  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"'|internal-sftp|g' /etc/ssh/sshd_config; done

  3. Reload the SSHD service:

    # service sshd reload

Was this article helpful?

Comments

2 comments
Date Votes
  • 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.

    0
  • wrong solutions for chrotted

    0

Please sign in to leave a comment.