VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

Testing port connectivity with the Telnet command

Purpose

For troubleshooting purposes, it may be necessary to test connectivity to the different ports on your servers.  This article provides you with the steps to use the Telnet utility to test connectivity to different ports on your servers from either a Windows or Linux host.

Resolution

Testing port connectivity with Telnet from Windows

To initiate a Telnet test to a port from Windows:
  1. Open a command prompt.  For more information, see Opening a command or shell prompt (1003892).
  2. In the command prompt window type telnet <server> <port> , where <server> is the hostname or IP address of the server, and <port> is the port that you want to connect to.
  3. Press Enter.

    Note: To exit out of the Telnet application  type Ctrl + ] and then type quit .
Depending on the application that uses the port, you may only see a blank screen with a cursor in the corner, this is normal. Two common outputs of a successful connection attempt are:
  1. Connecting to port 902 on an ESX Server:

    C:\>telnet server 902
    Connecting...

    220 VMware Authentication Daemon Version 1.10: SSL Required, ServerDaemonProtocol:SOAP, MKSDisplayProtocol:VNC

  2. Connecting to port 25 on a mail server:

    C:\>telnet server 25
    Connecting...

    220 server ESMTP Sendmail 8.13.3/8.13.3;
 
If Telnet is unable to connect to the port, the output is similar to the following:
 
C:\>telnet server 902
Connecting To server...
 
Could not open connection to the host, on port 902: Connect failed
 
C:\>
 

Testing port connectivity with Telnet from Linux or MacOS

To initiate a Telnet test to a port from Linux or MacOS:
  1. Open a shell prompt. For more information, see Opening a command or shell prompt (1003892).
  2. In the shell prompt window type telnet <server> <port> , where <server> is the hostname or IP address of the server, and <port> is the port that you want to connect to.
  3. Press Enter.

    Note: To exit out of the Telnet application  type CTRL + ] and then type quit.
Depending on the application that uses the port, you may only see a blank screen with a cursor in the corner, this is normal. Two common outputs of a successful connection attempt are:
  1. Connecting to port 902 on an ESX Server:

    [root@server]$ telnet server 902
    Trying server...
    Connected to server.
    Escape character is '^]'.
    220 VMware Authentication Daemon Version 1.10: SSL Required, ServerDaemonProtocol:SOAP, MKSDisplayProtocol:VNC

  2. Connecting to port 25 on a mail server:

    [root@server]$ telnet server 25
    Trying server...
    Connected to server.
    Escape character is '^]'.
    220 server ESMTP Sendmail 8.13.3/8.13.3;
If Telnet is unable to connect to the port, the output is similar to the following:
 
[root@server]$ telnet server 902
Trying server...
telnet: connect to address server: Connection refused
 
Note: Several distributions of Linux do not have a Telnet client installed by default, refer to the website of your distribution for details on whether one is available and how to install the package.

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (2 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (2 Ratings)   
Actions