Hello,
I think i did it correctly but it was marked failed :
1 - useradd kirsty
2 - passwd kirsty
3 - mkdir -p /var/www/data
4 - chown root:root /var/www
5 - chmod 755 /var/www
6 - chown kirsty:kirsty /var/www/data
7 - vi /etc/ssh/sshd_config
8 - I add in the bottom of the file :
Match User kirsty
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /var/www/data
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
9 - systemctl restart sshd
10 - When i did ssh kirsty@stapp03 i receive :
thor@jump_host /$ ssh kirsty@stapp03
kirsty@stapp03’s password:
packet_write_wait: Connection to 172.16.238.12 port 22: Broken pipe
11 - When i did sftp kirsty@stapp03 i receive :
thor@jump_host /$ sftp kirsty@stapp03
kirsty@stapp03’s password:
packet_write_wait: Connection to 172.16.238.12 port 22: Broken pipe
Couldn’t read packet: Connection reset by peer
Can someone tell me what did i did wrong please ?
Regards,
Zakaria