0

I have a file with 10 servers (one per line) and I need to check from time to time if telnet on port 1231 is opened.

How can I do that using a bash script?

I tried to find a similar topic related to my question on other topics, but I didn't find anything.

VGM
  • 69
  • 14
  • What have you tried yourself so far? How did (or didn't) that work? Can you be more specific what part you have problems with (reading from the file, telnetting, checking the status)? – Some programmer dude Oct 21 '15 at 14:05

1 Answers1

1

If you only want to test if the port is open you can use nmap:

$ nmap -p23 $ip

setting ip as the IP of the server.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134