unix-like operating systems
Probably, bsd- and gnu-implementations are most often found here: netkit-telnet and inetutils-telnet . for the specified diagnosis, the difference between them is insignificant.
An example of an unsuccessful connection to port 12345 on any of the servers, the ip-address of which resolves the name github.com :
$ telnet github.com 12345 Trying 192.30.253.113...
You can interrupt an unsuccessful attempt using ctrl + c
An example of a successful connection to the same server on port 22 :
$ telnet 192.30.253.113 22 Trying 192.30.253.113... Connected to 192.30.253.113. Escape character is '^]'. SSH-2.0-libssh-0.7.0
The last line here is information from a program listening to port 22 on the polled server.
if the connection was not immediately terminated by the listening program (it depends on its implementation and settings), then you can interrupt the telnet session by pressing the ctrl +] combination offered by the program and then the enter key, after which the telnet program prompt will appear:
telnet>
in which you can enter the q command (or fully - quit ) and press the enter key.
Microsoft Windows
Actions are almost identical to the version for unix-like operating systems. Windows has a built-in telnet client, but it can be disabled. To enable it you need to follow the steps described on the Microsoft website .
When everything is ready, you can start the telnet client like this:
Start - Run - telnet - OK
In the console window that opens, the following lines will be visible:
Welcome to Microsoft Telnet Client Escape Character is 'CTRL+]' Microsoft Telnet>
To try to open a particular address and port, you need to write the letter o , and then the address and port. For example:
Microsoft Telnet> o github.com 12345