Telnet is used from a console window and written as follows where telnet will establish a TCP/IP connection:
telnet <host|ip> <port>
An example of this as follows where the IP is an Ubuntu server and port 22 the port used by SSH:
When enter is is clicked on in the previous console window, the following is displayed:
Above it can be seen that the telnet connection accessed the SSH service on the Ubantu server. This means port 22 is open and SSH is listening on the port.
The exercise in testing ports relates to installing a tinyproxy proxy service on an Ubuntu service. The tinyproxy service is listening on port 21777 using TCP. To test the port port the following is entered in a Windows console window:
When the above command is invoked the following is displayed:
What appears to be blank screen actually means that telenet success accessed the tinyproxy service on port 21777.
Below is an example of telet being invoked on a port that is not open for the Ubuntu server:
Invoking the command above results in the following:
The screenshot above shows telnet waiting in vain for port 21778:
Eventually the attempted by telnet to connection to port 21778 will time out resulting in text such is displayed above.
So using telnet or bash (Testing if a remote port is open using BASH /dev/tcp/host/port) it has been shown how to determine if a port is open on a remote server with a service listening on the port.
No comments :
Post a Comment