Monday, December 2, 2019

How SFTP Connection Error Received unexpected end-of-file from SFTP server ?

I have Spent couple of days searching for this and before i gave up  I was able to solve my issue by logging into SSH and editing the sshd_config file:
sudo nano /etc/ssh/sshd_config
Then scroll down until you see this line:
# Subsystem sftp /usr/lib/openssh/sftp-server
Leave that line commented out, but underneath it write this:
Subsystem sftp internal-sftp
Then either power cycle your server or  just do service sshd restart and the problem should be fixed. I’m now using the latest version of Filezilla without any issues.

As a note: You may need to change/add the ForceCommand in the user/group match block to use internal-sftp as well:
Match User someuser
    ..... other stuff .....
    ForceCommand internal-sftp
This fix Also Mobaexterm 

SFTP error code 103 so Both FileZilla and Mobaexterm is working Now :-)