nerdexam
CompTIACompTIA

XK0-005 · Question #1437

XK0-005 Question #1437: Real Exam Question with Answer & Explanation

The correct answer is C: firewall-cmd --zone=public --permanent --add-service=ssh. {"question_number": 8, "correct_answer": "C", "explanation": "The error 'Resource temporarily unavailable' on SSH port 22 typically indicates the firewall is blocking the connection. The correct fix is firewall-cmd --zone=public --permanent --add-service=ssh, which adds the prede

Security

Question

A Linux user reported the following error after trying to connect to the system remotely: ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue: Which of the following commands will resolve this issue?

Options

  • Afirewall-cmd --zone=public --permanent --add-service=22
  • Bsystemctl enable firewalld; systemctl restart firewalld
  • Cfirewall-cmd --zone=public --permanent --add-service=ssh
  • Dfirewall-cmd --zone=public --permanent --add-port=22/udp

Explanation

{"question_number": 8, "correct_answer": "C", "explanation": "The error 'Resource temporarily unavailable' on SSH port 22 typically indicates the firewall is blocking the connection. The correct fix is firewall-cmd --zone=public --permanent --add-service=ssh, which adds the predefined SSH service rule (TCP port 22) to the public zone permanently. Option A uses --add-service=22, which is incorrect syntax - 22 is a port number, not a service name; the service name is ssh. Option B enables and restarts firewalld but doesn't add any rule to allow SSH. Option D adds port 22 but specifies UDP (22/udp), which is wrong - SSH operates over TCP, not UDP.", "generated_by": "claude-sonnet", "llm_judge_score": 4}

Topics

#firewalld#SSH#Firewall Rules#Network Security

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions