Announcement

Collapse
No announcement yet.

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

  • 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!
    admin
    Administrator
    Last edited by admin; 08-18-2015, 07:05 AM.
Working...
X