An internal security audit has revealed that telnet.socket is active on a RHEL 8 server, exposing TCP port 23 and permitting plaintext logins from the network. You must eliminate this risk immediately and ensure that the Telnet service cannot be re-enabled-either at boot or through accidental socket activation-while leaving all other services untouched. Which single command best satisfies the requirement?
The goal is to stop the Telnet listener right away and prevent any future activation. With systemd, masking a unit replaces its service file with a symbolic link to /dev/null. This makes it impossible for the unit to start manually, by dependency, or through socket activation. Adding --now stops the socket instantly. Disabling a unit only prevents automatic startup at boot; the service could still be started manually or by another unit, so it does not meet the audit requirement. Simply stopping the socket or changing the firewall leaves the service installed and potentially restartable. Removing the Telnet service from the firewall also does nothing to the running socket or to future local activations. Therefore, systemctl mask --now telnet.socket is the only single-command solution that both halts the insecure service and ensures it remains unavailable.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'systemctl mask' command do?
Open an interactive chat with Bash
What is the difference between 'systemctl disable' and 'systemctl mask'?
Open an interactive chat with Bash
Why is Telnet considered insecure, and what should you use instead?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .