Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Disable or Restrict Root Login via SSH on Linux – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Fri, 06 Dec 2019 23:47:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Disable or Restrict Root Login via SSH on Linux https://support.aklwebhost.com/knowledgebase/disable-or-restrict-root-login-via-ssh-on-linux/ https://support.aklwebhost.com/knowledgebase/disable-or-restrict-root-login-via-ssh-on-linux/#respond Fri, 06 Dec 2019 23:41:35 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2651 Allowing root login over SSH is commonly considered a poor security practice throughout the tech industry. Instead, you could perform sensitive administrative tasks by connecting with a user account and executing commands using sudo.

Disable root access

View the contents of the SSH configuration file using the following command.

cat /etc/ssh/sshd_config

In this file you will find the following line:

#PermitRootLogin no

Un-comment the line using your desired editor. Then restart the SSH service for the changes to take effect.

/etc/init.d/ssh restart

Please note that login to the root account will still be possible via the AKLWEB HOST console.

Restrict root access by IP address

As previously mentioned, a good security practice is to not allow root access via SSH at all. However if root access is absolutely necessary, you can restrict it by IP address.

To restrict root access to a specific IP address add the following line to the sshd_config file (substitute xxx.xxx.xxx.xxx for the IP address).

AllowUsers root@xxx.xxx.xxx.xxx

Restart the SSH service for the changes to take effect.

/etc/init.d/ssh restart
]]>
https://support.aklwebhost.com/knowledgebase/disable-or-restrict-root-login-via-ssh-on-linux/feed/ 0