SFTP Troubleshooting - end of life error

When you run into this error for an SFTP connection: Error: Received unexpected end-of-file from SFTP server


A needed configuration change in the sshd_config file to allow this connection to work.



Edit the sshd_config file in /etc/ssh/ with your favorite editor, save the file, and restart ssh.


Once in the sshd_config file, scroll down until you see this line:


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


Make sure that above line is commented out if it isn't already.  Then, add the below line to the configuration.


Subsystem sftp internal-sftp


Now, save this file and restart ssh to make it take effect.