Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Forge + DigitalOcean - Adding a SFTP user with restricted access only to a directory

I am using Laravel Forge in a DigitalOcean droplet. I need to grant SFTP access to a specific directory on the server to one of my clients. He needs read/write access to only that directory, and I am having problems with the setup.

I have followed the steps in https://bensmann.no/restrict-sftp-users-to-home-folder/, but I am stuck because Forge does not permit password authentication, only through public/private SSH keys...

Has someone done something similar? What would be the best approach for getting it done?

Many thanks in advance.

like image 390
andcl Avatar asked Oct 29 '22 16:10

andcl


1 Answers

I know it's late, but it might help somebody in the future. I used Freek's post to set this up in Forge and although it seemed temperamental at first locking me out of SSH completely, it just started working after a few minutes.

like image 176
Barnabas Kecskes Avatar answered Nov 27 '22 15:11

Barnabas Kecskes