Install And Configure SFTP

sftp [email protected] fails with below error

write_wait: Connection to port 22: Broken pipe

Couldn’t read packet: Connection reset by peer

Below are configured
useradd siva -d /var/www/appdata -s /sbin/nologin

passwd siva

/etc/ssh/sshd_config details
Match User siva
PasswordAuthentication yes
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp

retstarted sshd using systemctl restart sshd

Details of user
[[email protected] ~]# id siva

uid=1002(siva) gid=1002(siva) groups=1002(siva)

[[email protected] ~]# cat /etc/passwd | grep siva

Permission for /var/ww/appdata

755, and siva user and group added as owner

you have to give ownership appdata directory to as root , to resolve that broken pipe error.

Thank you it helped to fix the issue. I’m able to do sftp

kindly help i am not able to restart ssh service i get the error.
and please help how to make jim user and group as owner