nerdexam
CompTIA

XK0-005 · Question #1437

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…

The correct answer is C. firewall-cmd --zone=public --permanent --add-service=ssh. 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…

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?

Exhibit

XK0-005 question #1437 exhibit

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

How the community answered

(37 responses)
  • A
    8% (3)
  • B
    14% (5)
  • C
    76% (28)
  • D
    3% (1)

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.

Topics

#firewalld#SSH#Firewall Rules#Network Security

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice