CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux administrator discovers that the account reports_user can open an interactive shell with ssh, even though the account should be limited to Secure File Transfer Protocol (SFTP) uploads on port 22. The change must apply only to that one account and must not affect other users who legitimately need full SSH access. Which single modification to /etc/ssh/sshd_config best meets the requirement?

A reboot is not an acceptable solution; the fix must take effect after the standard sshd service reload.

  • Append a Match block for reports_user that contains ForceCommand internal-sftp, then reload sshd.

  • Change reports_user's login shell in /etc/passwd to /sbin/nologin.

  • Add DenyUsers reports_user to sshd_config and restart the sshd service.

  • Replace the existing SFTP Subsystem line with Subsystem sftp internal-sftp.

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