How to Disable SSH Login for the Root User in Linux?

Please refer to the following article to disable root login using SSH in Linux. 

  1. Login to your Linux server via console or sudo user.

  2. Open the sshd_config file from the location /etc/ssh/ using your favorite browser.

    vi /etc/ssh/sshd_cofig
  3. Change the Permit root login to sshd_config and save the file. 

    → Looking to change SSH port on ubuntu? Please refer to the change ssh port on ubuntu for more details.

Related Articles

How to verify Linux System Is 32-bit or 64-bit?

You will find 64-bit OS in most modern computers. It is always recommended to have a 64-bit OS...

How to sync time using NTP in Ubuntu server?

Linux server users might have noticed that after adjusting the system clock to the correct time,...

How to Enable Root User in Ubuntu Server?

Please refer to the below steps to enable root user in ubuntu. Login to your ubuntu server...

How to Install and Configure the HAProxy on CentOS?

HAProxy is a very fast and decent tool to achieve high availability, load balancing. It can work...

How to install OPcache in cPanel/WHM?

OPcache is a PHP extension and it helps to improve the performance of your php Website. OPcache...

  • 0 Users Found This Useful

Was this answer helpful?