Ubuntu/Fedora – Disable Root SSH

For security reason, we’d better disable the root SSH access to server. Follow the steps below. (root privilege is needed)

1. Edit the SSH config file

  • Ubuntu – vi /etc/ssh/sshd_config
  • Fedora – vi /etc/sshd/sshd_config


 

2. Set the PermitRootLogin to no

PermitRootLogin no

 

3. Restart the SSH service

  • Ubuntu – /etc/init.d/ssh restart
  • Fedora – /etc/init.d/sshd restart

 

Done =)

Reference: Security Tip: Disable Root SSH Login on Linux

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.