XK0-005 · Question #815
XK0-005 Question #815: Real Exam Question with Answer & Explanation
The correct answer is A: firewalld-cmd --permanent --add-port=22/tcp. {"question_number": 4, "correct_answer": "A", "explanation": "The command 'firewall-cmd --permanent --add-port=22/tcp' opens TCP port 22 (SSH standard port) permanently in the firewalld firewall. The '--permanent' flag ensures the rule persists after reboot. Note the correct bina
Question
A user sends a request to access a virtual server via SSH. Which of the following commands is used to open the SSH standard port?
Options
- Afirewalld-cmd --permanent --add-port=22/tcp
- Biptables-save | grep dport-22/tcp
- Ciptables -A INPUT -p tcp --dport sshd -j ACCEPT
- Dfirewalld-cmd --remove-service=ssh --permanent
Explanation
{"question_number": 4, "correct_answer": "A", "explanation": "The command 'firewall-cmd --permanent --add-port=22/tcp' opens TCP port 22 (SSH standard port) permanently in the firewalld firewall. The '--permanent' flag ensures the rule persists after reboot. Note the correct binary is 'firewall-cmd' (not 'firewalld-cmd'); among the given choices, A represents the correct syntax and intent. Option B uses 'iptables-save | grep' which only reads/saves rules, it does not open a port. Option C uses '--dport sshd' which is invalid syntax (must use a port number, not a service name, with that flag). Option D removes the SSH service from firewalld, which would block SSH access.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.