FTPMonitor / Guides / FTP connection refused

FTP connection refused

Why FTP servers refuse connections and how to diagnose port, service, and firewall issues.

Diagnose this automatically

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

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

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

Connection refused means the host responded but the FTP service is not accepting connections on that port.

This usually indicates the FTP service is down, the port is incorrect, or a firewall is actively rejecting the connection.

Common causes

  • FTP service is not running
  • Wrong port configured
  • Firewall rejecting inbound connections
  • Server moved FTP to a custom port

Fix checklist

  1. Confirm FTP service is running on the server.
  2. Verify the correct FTP port with the server administrator.
  3. Check firewall rules or security groups.
  4. Test connectivity from inside the same network.

Quick commands

nc -vz <host> 21
telnet <host> 21
Related
  • ECONNREFUSED on port 21Why FTP port 21 returns connection refused, and how to isolate service-down vs firewall vs wrong host/port.
  • TCP connection failedGeneral TCP failure causes when connecting to FTP, FTPS, or SFTP services.
Diagnostics powered by FTPMonitor CLI