IBM Support

IBM AIX: The telnet command fails and prints "telnet: connect: A remote host refused an attempted connect operation."

Troubleshooting


Problem

The AIX® telnet command fails to connect to a remote system with this error message.
telnet: connect: A remote host refused an attempted connect operation.
This failure can occur with the standard telnet port of 23, or with other ports.

Cause

The error message "A remote host refused an attempted connect operation" means that telnet failed from an ECONNREFUSED error. This error occurs when a connect operation from telnet sends a TCP SYN packet to initiate a connection but the target system returns a TCP RST packet in response.
In most cases, the connection refusal failure occurs for one of two reasons.
  1. No program is listening on the TCP port.
  2. A firewall blocked access to the target system or the port and returned a TCP RST packet.

Resolving The Problem

  1. Confirm that a program on the target system is listening on the TCP port.
  2. Check the configuration of any firewalls in between AIX and the target system that blocks access to the target system or the TCP port.

SUPPORT:

If the instructions in this document do not lead to resolution of the problem, follow these instructions to open a case. The product must be under warranty or have an active and valid support contract.

a. Document or take screen captures of all symptoms, errors, or messages.

b. Capture any logs or data relevant to the issue.

c. Contact IBM® to open a case.

-For electronic support, visit the IBM Support Community:
https://www.ibm.com/mysupport
-If you require telephone support, visit this web page:
https://www.ibm.com/planetwide/

d. Provide a detailed description of the issue and a reference to this technote.

e. Upload all of the details and data to the case.

-You can attach files to the case in the IBM Support Community, or
-Upload data to IBM test case server analysis at this URL:

http://www.ibm.com/support/docview.wss?uid=ibm10733581

f. Click here to submit feedback for this document.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvxRAAQ","label":"Communication Applications-\u003ENETWORKING COMMANDS\/FILES"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
25 September 2023

UID

ibm17038981