From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configure host- and user-based security

Configure host- and user-based security

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Configure host- and user-based security

- [Instructor] It's generally a bad idea to log into a server as a root user. Logging in as a regular user and then elevating privileges via sudo or the SU command is a much better strategy. If we allow root logins, even if the password is very strong, then hackers will target that account. The solution is to restrict root logins by way of SSH, which is fairly easy to do. It doesn't matter which VM you do this on, I'll be using my rhhost1 vm. Let's make sure that we can login to our vm now as root. Type in ssh root@local host and hit enter. Type in root's password and hit enter again. This shows we can login as root. Having a strong password is a good idea, but not allowing root logins is better. Type in exit to logout. Now lets open the SSHD_config file in VI. Type in clear and then type in sudo vi/etc/ssh/sshd_config and hit enter. Type in your password if prompted and then hit enter. Now lets search for the word permit by pressing the forward slash and typing permit with an…

Contents