1

Problem: I need to allow ssh access to my web server to dev team in order to use Drush. I am reluctant to give them full SSH access due to lack of trust in their SSH skills and knowledge.

Attempted Solution: I tried creating users on my server and only allow them access to Drush using the following command.

useradd -s /usr/bin/drush drushuser

On logging in with drushuser, a list of commands displays and logs out immediately.

I do something similar with git and git-shell, I set the /usr/bin/git-shell as their default shell and it does allow them to push and pull content remotely.

Is there any way I can get the same results for drush?

1 Answer 1

0

Drush has some sort of interactive shell - try drush php:cli. (You would created a script /usr/local/bin/drush-shell similar to git-shell.) However, I just tested and it doesn't seem to work for Drush 9. If you are still using Drush 8, it seems to work just fine (as drush core-cli). Disclaimer: I haven't actually tested this as a login shell.

The other more standard approach is to use lshell and set it up so Drush and needed tools can be used. I haven't tested this either - sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.