CompTIA Linux+ XK0-006 (V8) Practice Question

While hardening a server's SSH configuration, an administrator adds the following two lines to /etc/ssh/sshd_config and restarts sshd:

DenyUsers test*
AllowGroups admins

No other Allow/ Deny directives are present. Which statement correctly describes the effect of this change on future SSH login attempts?

  • Members of the admins group can always log in; the AllowGroups directive overrides the DenyUsers rule.

  • Any account whose username begins with test is denied SSH access even if that account belongs to the admins group.

  • Because both directives are present, sshd will fail to start until one of them is removed.

  • AllowGroups checks only a user's primary group; users who have admins solely as a supplementary group will still be rejected.

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot