Error Connection has been unexpectedly closed. Server sent command exit status 128. Cannot initialize SFTP protocol. Is the host running an SFTP server? OK Reconnect Help

When you try to connect the SFTP connection, then you may receive this error also

Received unexpected end-of-file from SFTP server

Please refer to the following steps to fix this issue.

1. Edit the sshd_config file with your favorite editor.

nano etc/ssh/sshd_config

2. Locate the below line in the sshd_config file.

#Subsystem sftp /usr/lib/openssh/sftp-server

3. You need to comment on the line if it isn't already. Now, add the below line to the configuration.

Subsystem sftp internal-sftp

4. Save the sshd_config file and restart the ssh service.

service sshd start


→ Click on configure > SMTP to set up SFTP on Linux VPS with cPanel.

→ Looking to connect FTP over SSL/TLS in FileZilla? Please refer to CONNECT FTP OVER SSL/TLS IN FILEZILLA for more details.

→ Looking to connect FTP through a web browser? Please refer to Access FTP through Web-browser for more details.

→ Looking to upload files using Dreamviewer? Please refer to the upload using dreamviewer for more details.


Was this answer helpful?

« Back

chat