The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Root access

Discussion in 'General Discussion' started by Pedro Oliveira, Jul 14, 2016.

  1. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    I'm getting permission denied on both those logs.....I'm not in as root.

    Where would I change the root password? I have access to the WHM panel and cpanel
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I've moved this post to it's own separate thread. You can update the "root" password via:

    "WHM >> Server Configuration >> Change Root Password"

    The following document is also useful as it explains the potential SSH security options that you may have enabled in the past:

    https://documentation.cpanel.net/display/CKB/How+to+Secure+SSH

    Thank you.
     
  3. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    Thanks, I changed the password but I get access denied when trying to login via ssh. I've also gone over the link you sent, I don't see an option to prevent root from logging in unless I'm missing it...
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Check to see if password authentication is permitted by browsing to:

    "WHM Home >> Security Center >> SSH Password Authorization Tweak"

    Otherwise, you can try the safesshrestart Autofixer that's documented here to temporarily reset SSH access so you can login and change your /etc/ssh/sshd_config settings:

    WHM FAQ - WHM AutoFixer

    Thank you.
     
  5. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    Thanks Michael,

    So I get into the ssh_config and I'm adding permitrootlogin but then I get permission denied when trying to save the file.....
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you provide additional information about the specific commands you are using to edit the file, along with the username you used to access SSH?

    Thank you.
     
  7. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    I'm logged in as the user Caldwell who is not an admin and I used Nano sshd_config. I can edit the file but when I go to save it it gives me the permission error.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You must login as the user "root". You can try the safesshrestart Autofixer referenced above if initial access as "root" to SSH is not working.

    Thank you.
     
  9. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    I did the safesshrestart but it still wouldn't let me login as root.
    Let me try again!
     
  10. Pedro Oliveira

    Joined:
    Jul 13, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Toronto
    cPanel Access Level:
    Root Administrator
    That worked! I'll follow the instructions on the other thread. I guess you can close this now?
     
  11. Patrick Heinz

    Patrick Heinz Active Member

    Joined:
    Mar 14, 2015
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Twitter:
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I'm happy to see SSH access is now working. Thank you for updating us with the outcome.
     
Loading...

Share This Page