Disable remote SSH access with root

   Hi CloudBalkanians,

   As we’ve mentioned before in the “How to secure your linux cloud machine” article, direct SSH access with the ‘root’ user might be a big risk for your cloud machine. That’s why disabling ‘root’ remote access is often considered a good practice.

   Before you start, make sure that you have another user enabled for remote login.

   To disable remote access with the ‘root’ user, edit the /etc/ssh/sshd_config, find the following line:

#PermitRootLogin yes

   and change it to 

PermitRootLogin no

   A quick restart of the SSH server:

/etc/init.d/sshd restart

   And you’re there.

    

   Have a great day!

   
   Grow your ideas on solid ground!
   CloudBalkan