Fatal Error When Trying to Connect Sftp

Fatal Error When Trying to Connect Sftp

Issues I am having with getting a sftp working correctly. I have set this up many times, but for some reason this one is not working

I have my /etc/ssh/sshd_config file set like this:

#hch-somename 
Match User hch-somename
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /var/sftp/test/data
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no

If the past when setting this like this and using filezilla to connect to the sftp://ip-addr with the username and password it would drop me in the directory based off the ChrootDirectory setting in the /etc/ssh/sshd_config file, however what happens instead is I get an error message like this

Command:    Pass: *********************
Error:          FATAL ERROR: Connection reset by peer
Error:          Could not connect to server

Now the interesting thing is if I change the /etc/ssh/sshd_config file and change the ChrootDirectory to /var/sftp I am able to get logged in with no issues at all. I have never seen this before, hopefully someone can assist me with this.

10
Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.