SFTP unable to connect

override default of no subsystems

#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp

Example of overriding settings on a per-user basis

#Match User anoncvs

X11Forwarding no

AllowTcpForwarding no

PermitTTY no

ForceCommand cvs server

Match Group sftpusers
ForceCommand internal-sftp

PasswordAuthentication yes

    ChrootDirectory /var/www/appdata

PermitTunnel no

AllowAgentForwarding no

AllowTcpForwarding no

X11Forwarding no

https://www.thegeekstuff.com/2012/03/chroot-sftp-setup/

I followed this guide.

what more I needs to change?

@player001

@bilalshakir41396 have you restarted sshd service and added user to sftpusers group?

yes, I run these commands

useradd -g sftpusers -d /incoming -s /sbin/nologin mytaskusername

[tony@stapp01 ~] sudo service sshd restart Redirecting to /bin/systemctl restart sshd.service [tony@stapp01 ~] sudo service sshd restart
Redirecting to /bin/systemctl restart sshd.service

@player001

Before I was having the required user, but due to above command I deleted and with command user was created again.