Mistakeid unexpected end-of-file from SFTP server



  • When attempting to access the openssh server by SFTP protocol, receives a misstatement:

    Received unexpected end-of-file from SFTP server

    What does that have to do with it?



  • This error means you were successfully authorised on the SSH server, but for some reason you were unable to access the SFTP subsystem. I mean, SSH on the remote server works correctly and SFTP is not.

    The most elementary reason why this might happen is https://web.archive.org/web/20160701203647/http://superuser.com:80/questions/937424/cant-connect-to-sftp-received-unexpected-end-of-file-from-sftp-server (Screaming): /usr/lib/openssh/sftp-serveror its inaccessibility to the openssh server. Make sure that the SFTP subsystem file is on the SSH configuration./etc/ssh/sshd_config() Write right. The line for the default path looks like, for example:

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

    Then make sure that the user on whose behalf the SSH server is launched has the right to perform the SFTP subsystem file. After changes to sshd_config, if necessary, don't forget to reboot the SSH server for the make-up of the changes.

    If the SFTP subsystem is available, and there's still a mistake, or, moreover, suddenly, it's on the server before that, so the subsystem doesn't let you in the SSH server itself. This may occur if the system requires some direct action during the SSH connection, most often the forced steam rotation. In this case, you need to connect to the SSH system and carry out the required action, after which SFTP will be available again.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2