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 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like