ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 129 - XK0-005 discussion

Report
Export

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
Answers
A.
firewall-cmd --zone=public --permanent --add-service=22
B.
systemctl enable firewalld; systemctl restart firewalld
Answers
B.
systemctl enable firewalld; systemctl restart firewalld
C.
firewall-cmd --zone=public --permanent --add-service=ssh
Answers
C.
firewall-cmd --zone=public --permanent --add-service=ssh
D.
firewall-cmd --zone=public --permanent --add-port=22/udp
Answers
D.
firewall-cmd --zone=public --permanent --add-port=22/udp
Suggested 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 --addservice= 22 command is invalid, as 22 is not a valid service name. The systemctl enable firewalld; systemctl 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. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 543.

asked 02/10/2024
aakriti grover
51 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first