Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SSH keys and disabling root

Discussion in 'Security' started by greektranslator, May 26, 2018.

  1. greektranslator

    greektranslator Well-Known Member

    Joined:
    Jun 5, 2011
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    I have disabled Password Authentication and I log in via an SSH key and passphrase. However, I use root for that.
    Should it be changed to a different username, and if yes, how? I tried adding a user in the wheel users group but since Password Authentication is disabled there is no way to log in with that and then switch to root.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,838
    Likes Received:
    275
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @greektranslator

    If you want to use a sudo (wheel) user You can but you'd most likely want to enable the NOPASSWD option in /etc/sudoers:

    Code:
    ## Allows members of the 'sys' group to run networking, software,
    ## service management apps and more.
    # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
    
    ## Allows people in group wheel to run all commands
    %wheel  ALL=(ALL)       ALL
    
    ## Same thing without a password
    # %wheel        ALL=(ALL)       NOPASSWD: ALL
    

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice