I\'m running telnet command on a host for a given port (which is open), it returns 0 (success).
telnet
For trying telnet manually, I type the following comman
A slight improvement to the answer provided by Matthew above which allows you to use it inside shell scripts:
$ echo -e '\x1dclose\x0d' | telnet google.com 80 Connected to google.com. Escape character is '^]'. telnet> close Connection closed. $ echo $? 0