Error “Connection has been unexpectedly closed. Server sent command exit status 128. Cannot initialize SFTP protocol.

kumkumsharma

Administrator
Staff member
Error Message:

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”

Solution:

To resolve this error you can follow below steps:
  • Now you have to edit sshd_config file in any editor with below command. Here we are using nano editor.
Code:
nano etc/ssh/sshd_config
  • Search for the below line in your sshd_config file.
Code:
#Subsystem sftp /usr/lib/openssh/sftp-server
  • You have to comment the above line and add below line in this file.
Code:
Subsystem sftp internal-sftp
  • Now save your file and restart ssh service with below command to reflect changes.
Code:
service sshd start
 
Top