#StackBounty: #ssh #ftp #mac-osx #unix #sftp How to set seprate current directory for sftp in macos?

Bounty: 50

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 ?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.