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!

PermitRootLogin "without-password"

Discussion in 'Security' started by ronaldst, Mar 5, 2017.

Tags:
  1. ronaldst

    ronaldst Well-Known Member

    Joined:
    Feb 22, 2016
    Messages:
    58
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    I'm running CPanel on a VPS with CentOS 7. I want to secure the SSH and have limited logins to use a certificate/sshkey. I've made a new user, 'myuser' and added him to the group 'wheel'.

    ssh_config
    Code:
    # Allowed Users
    AllowUsers root myuser
    
    # Enable/Disable tunneled clear text passwords
    PasswordAuthentication no
    visudo
    Code:
    ## Allows people in group wheel to run all commands
    %wheel  ALL=(ALL)       ALL
    I am now only able to login using my sshkey. Any attempt to login with a password is rejected. Great!

    Now.. When I run 'My Security Advisor' in CPanel it tells me me to change PermitRootLogin to "without-password" or "no".

    (CSF does not give any complaint's regarding this matter.)

    I am a little inexperienced and do not want this server to go tits up. I do not need to login as root directly, but I do need to be able to 'su' and 'sudo'.

    Am I safe to change PermitRootLogin to "no" and still be able to 'su -' from 'myuser'?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    43
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Yes, you will be able to login using 'su -' from 'myuser' even if you have set PermitRootLogin to "no"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael and ronaldst like this.
  3. ronaldst

    ronaldst Well-Known Member

    Joined:
    Feb 22, 2016
    Messages:
    58
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    Thank you!
     
    cPanelMichael likes this.
  4. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    43
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    You are welcome

    If you are facing any issue then please update the post. I will check and assist you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    ronaldst likes this.
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,758
    Likes Received:
    1,886
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    SysSachin likes this.
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