FTPMonitor / Guides / TCP connection failed

TCP connection failed

General TCP failure causes when connecting to FTP, FTPS, or SFTP services.

Diagnose this automatically

Test whether the network port is reachable before investigating authentication problems.

terminal
npx ftpmonitor check --protocol sftp --host example.com --port 22
Shareable output
terminal
npx ftpmonitor check --protocol sftp --host example.com --port 22 --format slack --copy

Prefer the browser? Run the same check on the homepage.

A TCP failure means the connection could not be established.

The most common reasons are: wrong port, service down, port closed, or a firewall block.

Common causes

  • Wrong port (e.g., using 22 for FTP or 21 for SFTP)
  • Service not running/listening on that port
  • Firewall/security group blocks traffic
  • Server only accessible from private network/VPN

Fix checklist

  1. Confirm protocol + port with the server owner/vendor.
  2. Verify the service is running and listening on the expected port (server-side).
  3. Check firewall/security group rules and IP allowlist.
  4. Try from inside the VPN/network if applicable.

Quick commands

nc -vz <host> <port>
telnet <host> <port>
Related
  • ECONNREFUSED on port 21Why FTP port 21 returns connection refused, and how to isolate service-down vs firewall vs wrong host/port.
  • ECONNREFUSED on port 22Meaning of ECONNREFUSED for SFTP/SSH on port 22 and the fastest ways to isolate firewall vs service vs wrong port.
Diagnostics powered by FTPMonitor CLI