Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Linux Shellscript(centos): Write a shell script to test connectivity of ports fr

ID: 3729013 • Letter: L

Question

Linux Shellscript(centos): Write a shell script to test connectivity of ports from client to server using nc command. 1.Script should be run from clientmachine 2. Test the connection from client to multiple servers. 3. script should able to test multiple ports 4. For successful connection ports write the output to one file with hostname and port numbers. 5. For failed connection server list and port numbers should write into one file.
Thanks
Linux Shellscript(centos): Write a shell script to test connectivity of ports from client to server using nc command. 1.Script should be run from clientmachine 2. Test the connection from client to multiple servers. 3. script should able to test multiple ports 4. For successful connection ports write the output to one file with hostname and port numbers. 5. For failed connection server list and port numbers should write into one file.
Thanks
1.Script should be run from clientmachine 2. Test the connection from client to multiple servers. 3. script should able to test multiple ports 4. For successful connection ports write the output to one file with hostname and port numbers. 5. For failed connection server list and port numbers should write into one file.
Thanks

Explanation / Answer

The simplest command to check the port activeness is

Checking multiple ports

nc -zv 192.168.56.10 80 22 21

Checking range of ports from 8000-9000

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote