What is the best practice for ssh root login - CompTIA Linux + XK0-005

Question

What is the best practice for SSH root login?

Answers
  1. correct
Explanation

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.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

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

View Courses Offered