Prevent telnet from being offered by /etc/xinetd.d/telnet.
Which value is appropriate?
In an xinetd per-service configuration, disable = yes disables the service.
Detailed explanation
disable = yesCorrect. It disables the xinetd service.
Correct. It disables the xinetd service.
enable = noIncorrect. The conventional option is disable, not enable=no.
Incorrect. The conventional option is disable, not enable=no.
stop = trueIncorrect. stop is not the xinetd per-service directive.
Incorrect. stop is not the xinetd per-service directive.
firewall = denyIncorrect. Firewall policy is a separate layer.
Incorrect. Firewall policy is a separate layer.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'service telnet { disable = yes }' | grep 'disable = yes'Expected result
service telnet { disable = yes }Key points
- disable directive
- yes means disabled
- Separate from firewall rules
Notes
- Environment: GNU grep / 模擬設定のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.