Which of the following commands will resolve this issue?
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?
A . firewall-cmd –zone=public –permanent –add-service=22
B . systemct1 enable firewalld; systemct1 restart firewalld
C . firewall-cmd –zone=public –permanent –add-service=ssh
D . firewall-cmd –zone=public –permanent –add-port=22/udp
Answer: C
Explanation:
The firewall-cmd –zone=public –permanent –add-service=ssh command will resolve the issue by allowing SSH connections on port 22 in the public zone of the firewalld service. This command will add the ssh service to the permanent configuration of the public zone, which means it will persist after a reboot or a reload of the firewalld service. The firewall-cmd –zone=public –permanent –add-service=22 command is invalid, as 22 is not a valid service name. The systemct1 enable firewalld; systemct1 restart firewalld command will enable and restart the firewalld service, but it will not change the firewall rules. The firewall-cmd –zone=public –permanent –add-port=22/udp command will allow UDP traffic on port 22 in the public zone, but SSH uses TCP, not UDP.
References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 543.
Latest XK0-005 Dumps Valid Version with 136 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund