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

  • 0

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.

Was this answer helpful?

« Back
Sign up for a newsletter

chat