I have numerous linux boxes with a very limited set of commands and disk space. But it has the telnet
command on it.
I remotely connect to each of these probes (programmatically) and issue one line linux command through SSH.
I need to run a single command to connect to a specific machine, using telnet, and then disconnect right away.
I can do all that, but the disconnection right away part. Telnet opens some sort of a console, or terminal and I can't figure out a one-line command to run the telnet command and then disconnect right away.
If I do that, I can easily parse the textual output for error messages for not being able to connect to the machine on the specified port and that's exactly what I am looking for.
So how can I run a one-line command to connect to a machine using telnet and disconnect afterwards ?