Ad

Login As Root Using Laravel Forge

- 1 answer

I have executed a recipe on a server at Laravel Forge. The recipe is for some reason run as root. When connecting to the server through ssh, I use user forge. But since the recipe was run as root, I cannot access some processes. My first thought was to log in as root, but I think Forge has disabled that. Using ssh [email protected] results in Permission denied (publickey).

How do I login as root using Forge?

Edit: Apparently, on Forge, you can chose the user on which the recipe is run.

Ad

Answer

I ended up first adding forge ALL = NOPASSWD : ALL via sudo visudo and then adding an alias for ssh -t [email protected] "sudo -i".

Ad
source: stackoverflow.com
Ad