How to disable direct root login from SSH?

Collapse

Unconfigured Ad Widget

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • John_Accuwebhosting
    Senior Member
    • Jun 2006
    • 120

    How to disable direct root login from SSH?

    It is a big security hole to allow users to directly login to SSH via root. To avoid and also to avoid brute force attack to your server you may want to disable direct root login via SSH to your server. Below are the exact steps to disable direct root login to server via SSH:

    1. Login to server as a root via SSH.
    2. Open the file /etc/ssh/sshd_config via vi /etc/ssh/sshd_config.
    3. Find the line Protocol 2, 1 and replace it to Protocol 2
    4. Uncomment the line "PermitRootLogin" no
    5. Restart sshd service via /etc/init.d/sshd restart command.

    That's it!
    Last edited by admin; 08-18-2015, 07:05 AM.
    John D.
    Support Technician,
    accuwebhosting.com
    Windows based hosting
    Linux based hosting
Working...
X