Issue
Yesterday, I update my cPanel version on my droplet. After update, it says that I have to enable cpHulk. So, I enable it, with a bunch of config that I don't event understand. The thing that I remember that I disabled root login trough WHM and SSH. I don't have any other login except root for WHM and SSH.
I did some tutorial that I found:
- I reset the root password at DigitalOcean dashboard, and I try to login SSH which is not working.
- I reset password and login to WHM, also not working.
- I tried to boot from recovery ISO and enable SSH root login, also not working.
And my question: How to enable root login and password authentication trough recovery web console?
Solution
It's done.
In the control panel, I click Recovery on the left, then click the Boot from Recovery ISO box. I toggle the power button to power your Droplet back on. When it’s on, I access my Droplet by clicking on Access to the left, then clicking the Launch Console button.
This Linux environment is running from the ISO image, not from my Droplet, so I will have to mount the filesystem into my environment in order to access my files. To do so, select 1 at the recovery menu and press ENTER. My disk image will be detected and mounted under /mnt in the recovery environment.
Then I go to the bash by select menu 6, and ENTER
Then I update the ssh config:
cd /mnt
nano etc/ssh/sshd_config
I added a line in the Authentication section of the file that says PermitRootLogin yes. This line may already exist and be commented out with a "#". In this case, remove the "#".
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
Then I save the updated etc/ssh/sshd_config
file.
Back to the control panel. Go to recovery and select "Boot from Hard Drive". I turn off and on the server.
I try to login trough SSH using root, and it works. Then I continue to disable cpHulk. https://documentation.cpanel.net/display/CKB/cPHulk+Management+on+the+Command+Line#cPHulkManagementontheCommandLine-DisablecPHulk
Answered By - tirta keniten Answer Checked By - Candace Johnson (WPSolving Volunteer)