On This Page: [hide]
You open FileZilla, enter your credentials, hit connect, and get this: ECONNREFUSED – Connection refused by server. The connection dies before it starts. This error means the server actively rejected your request. Not a timeout. Not a wrong address. An explicit “no.”
Quick fix: Change your port from 21 to 22 and set the protocol to SFTP. This resolves the issue for most users. If that doesn’t work, your firewall or antivirus is probably blocking the connection.
Last reviewed: March 2026. Steps verified with FileZilla 3.67+

What Does ECONNREFUSED Mean?
This error tells you the server received your connection request and rejected it. Your computer found the server. The address is correct. But something on the server side said no.
Think of it like this: you knocked on the right door, but nobody opened it. Either nobody’s home (the FTP service isn’t running) or they chose not to answer (a firewall blocked you).
Common Causes
- Wrong port number: Using port 21 (FTP) when your host requires port 22 (SFTP)
- Firewall blocking traffic: Windows Defender, macOS firewall, or router settings stopping FTP
- Antivirus interference: McAfee, Norton, or Kaspersky treating FileZilla as suspicious
- FTP service not running: The server’s FTP daemon (background service) is stopped
- ISP blocking port 21: Some internet providers block standard FTP traffic
- Wrong protocol: Using FTP when the server only accepts SFTP or FTPS
Let’s work through each fix, starting with the most common solution.
Fix 1: Switch to Port 22 and SFTP Protocol
This single change fixes the problem for most users. Many hosting providers have disabled traditional FTP entirely. They only allow SFTP (SSH File Transfer Protocol), which uses port 22 instead of port 21.
Step-by-Step Instructions
- Open FileZilla
- Click File then Site Manager (or press Ctrl+S on Windows, Cmd+S on Mac)
- Select your saved site, or click “New Site” to create one
- Find the Protocol dropdown. Change it to SFTP – SSH File Transfer Protocol
- In the Port field, enter 22
- Click Connect
Using Quickconnect instead? Type 22 in the Port field at the top of FileZilla. Note that Quickconnect defaults to FTP protocol. For SFTP, use Site Manager.
Why This Works
Port 21 (standard FTP) is often blocked. ISPs block it. Corporate networks block it. Firewalls block it by default. Port 22 (SFTP) uses SSH encryption. Most networks allow it through. Plus, SFTP is more secure anyway.
Still getting the error? Move to Fix 2.
Fix 2: Temporarily Disable Your Firewall and Antivirus
Security software sometimes flags FTP connections as threats. McAfee’s “Access Protection” feature is known for blocking FileZilla silently. No warning. No log entry. Just a failed connection.
Disable Windows Firewall
Windows 11:
- Open Settings (Win + I)
- Go to Privacy & security, then Windows Security
- Click Firewall & network protection
- Click your active network (Private or Public)
- Toggle Microsoft Defender Firewall to Off
- Try connecting with FileZilla
Windows 10:
- Open Control Panel
- Go to System and Security, then Windows Defender Firewall
- Click Turn Windows Defender Firewall on or off in the left sidebar
- Select Turn off Windows Defender Firewall for both Private and Public networks
- Click OK
- Try connecting with FileZilla again
Important: Re-enable your firewall after testing. If disabling it fixed the connection, add FileZilla as an allowed application. Don’t leave your firewall off permanently.
Disable macOS Firewall
- Click the Apple menu, then System Settings (or System Preferences on older versions)
- Go to Network, then Firewall
- Toggle the firewall Off
- Test your FileZilla connection
Disable Linux Firewall (Ubuntu/Debian)
If you’re connecting from a Linux machine:
sudo ufw status
If active, temporarily disable it:
sudo ufw disable
Test your connection. Re-enable with sudo ufw enable after testing.
Check Antivirus Software
If disabling the firewall didn’t help, check your antivirus next.
- McAfee: Right-click the system tray icon. Open Virus Console. Disable “Access Protection”
- Norton: Open Norton. Go to Settings, then Firewall. Turn off Smart Firewall temporarily
- Kaspersky: Open Kaspersky. Go to Settings, then Protection. Disable the Firewall component
- Bitdefender: Open Bitdefender. Go to Protection, then Firewall. Turn it off
Connection works now? Add FileZilla (filezilla.exe) to your antivirus exceptions list. Then re-enable protection.
Fix 3: Run FileZilla’s Network Configuration Wizard
FileZilla includes a built-in diagnostic tool. It tests your connection settings and suggests fixes. This helps when the first two fixes didn’t work.
How to Use the Network Configuration Wizard
- Open FileZilla
- Click Edit, then Network Configuration Wizard
- Click Next on the welcome screen
- For Default transfer mode, select Passive (recommended)
- Check the box labeled Allow fallback to another transfer mode on failure
- Click Next
- Select Use the server’s external IP address instead
- Choose Get the external IP address from the following URL
- Leave the default URL:
http://ip.filezilla-project.org/ip.php - Click Next
- For port settings, select Ask operating system for a port
- Click Test
FileZilla connects to probe.filezilla-project.org and runs diagnostic tests. If all tests pass, try connecting to your server again.
Why Passive Mode Helps
FTP uses two connection modes: Active and Passive. Active mode requires the server to connect back to your computer. Firewalls often block this incoming connection. Passive mode keeps all connections outbound from your computer. This works better with firewalls and NAT (Network Address Translation) routers, which most home networks use.
Fix 4: Verify Your Login Credentials
Wrong credentials usually cause a different error (like “530 Login incorrect”), not ECONNREFUSED. But if you’re entering credentials in Quickconnect and getting confused results, it’s worth checking. Also, some servers reject connections entirely if the username doesn’t exist.
Where to Find Your FTP Credentials
Your web hosting provider supplies these credentials. Look in your hosting control panel for:
- Host/Server: Usually your domain (example.com), an IP address, or ftp.example.com
- Username: Often your cPanel username or a dedicated FTP username you created
- Password: Your FTP password (not necessarily your hosting account password)
- Port: 21 for FTP, 22 for SFTP, 990 for FTPS (FTP over SSL)
Check under “FTP Accounts” in cPanel, Plesk, or DirectAdmin to verify or reset credentials.
Common Credential Mistakes
- Using your email password instead of FTP password
- Extra spaces before or after the username
- Forgetting that FTP passwords are case-sensitive
- Using [email protected] when just the username is needed (or vice versa)
SFTP with SSH Keys
Some servers (especially VPS and cloud hosting) require SSH key authentication instead of passwords. If your host gave you an SSH private key file:
- In Site Manager, set Logon Type to Key file
- Browse to your private key file (.pem, .ppk, or similar)
- Leave the password field empty unless the key has a passphrase
If you don’t have a key file and your host requires one, contact them or check your hosting dashboard for SSH key generation options.
Advanced Fixes
If the basic fixes didn’t work, the issue is likely server-side or network-related. This is more common on VPS hosting where you manage your own server configuration.
Check If the FTP Service Is Running
The server’s FTP service might be stopped or crashed. Test this from your computer’s command line.
Windows (Command Prompt):
telnet yourserver.com 21
Note: Telnet isn’t enabled by default on Windows. If you get “telnet is not recognized,” open PowerShell as Admin and run: dism /online /Enable-Feature /FeatureName:TelnetClient
Mac/Linux (Terminal):
nc -v yourserver.com 21
If the FTP service is running, you’ll see a response like “220 ProFTPD” or similar banner text. If it times out or refuses immediately, the service is down or blocked.
Try a Different Network
Some ISPs block port 21. Test your connection from a different network:
- A mobile hotspot (bypasses your home ISP)
- A friend’s internet connection
- A VPN service
If FileZilla connects from a different network, your ISP is blocking FTP. Switch to SFTP (port 22) or contact your ISP about unblocking port 21.
Check for Proxy or CDN Services
Using Sucuri, Cloudflare, or SiteLock? Your FTP connection might need adjustment:
- Add ftp. before your hostname:
ftp.yourdomain.com - Use your server’s direct IP address instead of the domain name
- Check your security service dashboard for FTP-specific instructions
Limit Simultaneous Connections
Some servers cap concurrent FTP connections. If you have multiple FileZilla windows open, the server might refuse new connections.
- Click Edit, then Settings
- Select Transfers in the left panel
- Set Maximum simultaneous transfers to 2
- Click OK
Update FileZilla
Older versions sometimes have compatibility issues with modern servers.
- Click Help, then Check for Updates
- Download and install any available updates
- Restart FileZilla and try connecting again
When to Contact Your Hosting Provider
Contact support if:
- You’ve tried all fixes above and still get the error
- The telnet/nc test shows the FTP service isn’t responding
- FileZilla works from a different network but not your home/office
- You recently changed hosting plans or server settings
- The error started suddenly with no changes on your end
A good host can check server logs and tell you exactly why connections are being refused. They can also confirm which port and protocol you should use.
What to tell support:
- The exact error message you see
- Which protocol and port you tried (FTP on 21, SFTP on 22)
- Whether you can connect from a different network
- When the issue started (suddenly, or always been like this)
- Any recent changes to your hosting account
If you’re having repeated FTP issues with your host, it might be worth looking at providers with better support ratings. Our shared hosting comparison includes support quality assessments.
Frequently Asked Questions
What is the difference between FTP and SFTP?
FTP (File Transfer Protocol) sends data unencrypted over port 21. Anyone monitoring your network could see your password. SFTP (SSH File Transfer Protocol) encrypts everything and uses port 22. Most hosting providers now require SFTP because it’s secure. If you’re getting ECONNREFUSED on port 21, switching to SFTP on port 22 often fixes it immediately.
Why does my connection work sometimes but not others?
Intermittent issues point to network instability or server load limits. Your ISP might throttle FTP during peak hours. The server might hit its maximum connection limit during busy periods. Try connecting at off-peak times. Limit FileZilla to 2 simultaneous connections. Or switch to SFTP, which ISPs are less likely to throttle.
Can I use something other than FileZilla?
Yes. If FileZilla keeps failing, try WinSCP (Windows), Cyberduck (Mac/Windows), or Transmit (Mac). Most cloud hosting providers also include web-based file managers in their control panels. These browser-based tools bypass FTP entirely. Useful when FTP ports are blocked. For WordPress sites specifically, many managed WordPress hosts offer one-click file access without FTP.
Why did this error suddenly appear when FileZilla was working before?
Something changed. Common culprits: your hosting provider disabled FTP or updated server security, your ISP started blocking port 21, or a Windows/antivirus update reset firewall rules. Check with your host first to confirm FTP/SFTP is still enabled. Then verify your local firewall settings haven’t changed.
Quick Troubleshooting Checklist
Run through these steps in order:
- Switch to SFTP on port 22 (File, Site Manager, Protocol: SFTP, Port: 22)
- Disable firewall temporarily to test if it’s blocking connections
- Check antivirus software, especially McAfee’s Access Protection
- Run the Network Configuration Wizard (Edit, Network Configuration Wizard)
- Verify FTP credentials in your hosting control panel
- Test from a different network using mobile hotspot or VPN
- Contact hosting support if nothing else works
Most ECONNREFUSED errors resolve at step 1 or 2. The error message sounds intimidating, but the fix is usually simple.

Everyone loves it when individuals get together and share views.
Great blog, stick with it!
eu to tentando conectar no ps3 mas ta dando este erro ( I am trying to connect to ps3 but giving this error )
Muchas gracias, me resolvieron exactamente el problema que tenia. Se soluciono al usar el puerto 22.