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!

Force Key-Authentification only for root

Discussion in 'Security' started by Contoweb, Jun 23, 2014.

  1. Contoweb

    Contoweb Member

    Joined:
    Jun 22, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi everbody

    Is it possilble only force the SSH key-authentification for the root user? If I enable this option, each account need a SSH key...

    Thanks for your help!

    Cheers!
    Contoweb
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    1,010
    Likes Received:
    87
    Trophy Points:
    78
    cPanel Access Level:
    DataCenter Provider
    In /etc/ssh/sshd_config set the PermitRootLogin setting as such:

    PermitRootLogin without-password

    This will force use of key-only logins for root, but other accounts can still use passwords.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,302
    Likes Received:
    1,847
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, the previous post is accurate. Remember to restart the SSHD service after making the change.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Contoweb

    Contoweb Member

    Joined:
    Jun 22, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Wow, thanks for this replies :) Works great!
    Should I prevent the SSh-Config for overwriting?
     
  5. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    1,010
    Likes Received:
    87
    Trophy Points:
    78
    cPanel Access Level:
    DataCenter Provider
    There should not be anything that should revert this change, so you should not need to change any permissions on the sshd_config file.
     
  6. Contoweb

    Contoweb Member

    Joined:
    Jun 22, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
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