Skip to main content

Force Key-Authentification only for root

Comments

5 comments

  • quizknows
    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.
    0
  • cPanelMichael
    Hello :) Yes, the previous post is accurate. Remember to restart the SSHD service after making the change. Thank you.
    0
  • Contoweb
    Wow, thanks for this replies :-) Works great! Should I prevent the SSh-Config for overwriting?
    0
  • quizknows
    There should not be anything that should revert this change, so you should not need to change any permissions on the sshd_config file.
    0
  • Contoweb
    Thanks :-)
    0

Please sign in to leave a comment.