FTPMonitor / Guides / SFTP connection refused

SFTP connection refused

What “connection refused” means for SFTP and how to fix port/service/firewall issues quickly.

Diagnose this automatically

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

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

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

“Connection refused” means the host is reachable, but nothing is accepting connections on the target port.

This is almost always service-down, firewall/allowlist, or the wrong port.

Common causes

  • SSH/SFTP service not running on the server
  • Wrong port (SFTP is commonly 22, but not always)
  • Firewall/security group blocking inbound connections
  • Server allowlist blocks your source IP

Fixes to try

  1. Confirm the port with the vendor/admin.
  2. From a machine in the same network, test TCP connectivity to host:port.
  3. Verify sshd is running and listening on the expected port.
  4. Check firewall rules/security group and allowlist the source IP.

Quick commands

nc -vz <host> 22
telnet <host> 22
ssh -vvv <user>@<host> -p 22
Related
Diagnostics powered by FTPMonitor CLI