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
I followed this guide.
what more I needs to change?
@Tej-Singh-Rana
@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
@Tej-Singh-Rana
Before I was having the required user, but due to above command I deleted and with command user was created again.