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.

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:
    940
    Likes Received:
    55
    Trophy Points:
    28
    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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  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:
    940
    Likes Received:
    55
    Trophy Points:
    28
    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