First i am going to explain what I'm trying to do. I have set up a webserver running ubuntu server on top of vmware-esxi. I want to use SFTP over SSH to upload my website's code. We did this in a php class I took.
I followed this guide.
So I have a user named sftpuser and a group called sftp and when I try to connect it gives the error:
packet_write_wait: Connection to x.x.x.x port 22: Broken pipe
My ssh config looks this at the bottom, the rest is unchanged
ClientAliveInterval 20 ClientAliveCountMax 5 TCPKeepAlive yes Match group sftp ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
I'm new to linux so I'm unsure what the cause could be. Thanks.
The error in /var/log/auth.log is
fatal: bad ownership of chroot directory component "/var/www"