Share via


Error Message: Error while connecting to the host - could not open a connection to host on port 23

Applies To: Windows Server 2008

This problem typically occurs when the Telnet server is configured to listen on a different TCP port number than the Telnet client is using to attempt a connection.

Telnet uses TCP port 23 by default when communicating from the client to the server. The port number used can be changed by an administrator. If it is changed, the client must know what number to instruct the Telnet client to use.

Diagnosis

The error message will display the port number that was used in the attempt to connect. This can be caused by either of the following:

  • The TCP port number used by the client in its connection attempt is not the same port number configured to be used by the Telnet server.

  • The Telnet server is not started, and so is not listening on the expected port number.

Resolution

To resolve this problem, do one of the following:

Verification

To confirm the port number that the Telnet server is currently listening on, run the command netstat -ab from an elevated command prompt (which was opened by using the Run as administrator option). The output should include an entry similar to the following:

TCP [::]:23 computername:0 LISTENING

[tlntsvr.exe]

The entry might also say ESTABLISHED instead of LISTENING.

The number in the second column indicates the port number on which the service is listening. If the entry for tlntsvr.exe is missing, then the service is likely not started.

See Also

Concepts

Error Message: The user has not been granted the requested logon type at this computer
Error Message: Access Denied - Specified user is not a member of the TelnetClients group
Error Message: The user's password must be changed before logging in the first time
Error Message: Telnet Server allows NTLM authentication only
You Cannot Connect to Network Drives by Using Current Logon Credentials
You Cannot Access Drive Letters Mapped by Others in Separate Telnet Sessions
Characters and Lines on the Telnet Client Display are Misaligned
The Cursor Loses Alignment with the Prompt
System Error 1058: Telnet Service Fails to Start