On my macos i am able to login to sftp as sftp localhost. When i run !pwd it shows me default directory is /Users/username but i want to change it /Users/username/Sites/wordpress.
I edited /etc/ssh/sshd_config file & added below lines at bottom of file
Match User username
X11Forwarding no
AllowTcpForwarding yes
PermitTTY yes
PasswordAuthentication yes
ChrootDirectory /Users/username/Sites/wordpress
But when i again try to login with sftp localhost after password prompt it gives me error as below
client_loop: send disconnect: Broken pipe
Connection closed
Please tell me how can fix this error ?
EDIT:
Subsystem sftp internal-sftpr
# Example of overriding settings on a per-user basis
Match User username
X11Forwarding no
AllowTcpForwarding yes
PermitTTY yes
PasswordAuthentication yes
ChrootDirectory /Users/username/Sites/wordpress