Reputation: 637
I'm new to Laravel Forge so I'm still wrapping my head around how it works. I've connected to my Digital Ocean account and provisioned a new server which is up and running. I connected my Github account and I successfully pulled my files to the server. So, all is good on that front.
However, there's one nagging issue. When Laravel Forge sets up the server, they issue a sudo user of "forge" and a password. I can SSH into the server using ssh [email protected] just fine. I do not need to enter a password to do this because I've put my id_rsa.pub into the Forge CP and into the Digital Ocean CP. But, when I try to sudo anything (eg. sudo rm), I'm prompted for my password. I'd like to avoid the step of having to provide my password when using sudo.
Upvotes: 2
Views: 2132
Reputation: 58292
The execution of commands via sudo
is a separate flow to SSH'ing into your server.
For example, even when you're using your local machine (assuming you're on a Mac or Linux OS), you still need to enter your password when issuing sudo
commands. The same with the server (regardless if its Forge or anything else).
There are ways around this: https://askubuntu.com/questions/147241/execute-sudo-without-password However, I would recommend leaving it on - if nothing else it acts an a reminder you may be doing something potentially risky.
Generally speaking, you don't need to SSH or sudo
too often when using Forge.
Upvotes: 0
Reputation: 462
Laravel Forge root access is restricted to prevent unintentional breaking of package dependencies as per the docs.
Security updates are automatically applied to your server on a weekly basis. Forge accomplishes this by enabling and configuring Ubuntu's automated security update service that is built in to the operating system.
Forge does not automatically update other software such as PHP or MySQL automatically, as doing so could cause your server to suffer downtime if your application's code is not compatible with the upgrade. However, it is possible to install new versions and patch existing versions of PHP manually via the Forge UI.
Upvotes: 0