What is the best practice for SSH root login?
The Correct Answer is: B. Disable via PermitRootLogin no
The best practice for securing SSH access is to disable root login by setting PermitRootLogin no in the /etc/ssh/sshd_config file. This prevents attackers from directly logging in as root, which is a common target for brute-force attacks. Instead, users should log in with a regular account and use sudo to perform administrative tasks, enhancing security and accountability.
Why the other options are incorrect:
A. Enable always
Allowing root login at all times is a major security risk, as it provides direct access to the system’s most privileged account. If the root password is compromised, an attacker gains full control of the system immediately.
C. Use telnet instead
Telnet is an insecure protocol that transmits data, including passwords, in plain text. It should never be used for remote logins, especially for administrative access. SSH is the secure alternative and should always be preferred.
D. Enable for convenience
While allowing root login might seem convenient, it sacrifices security for ease of use. Best practices prioritize protecting systems from unauthorized access, even if that means adding an extra step like using sudo after logging in with a regular user.
Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.
You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams