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…
Question
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)- A8% (3)
- B14% (5)
- C76% (28)
- D3% (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
Community Discussion
No community discussion yet for this question.
