How to solve? "ECONNREFUSED - connection refused by server"

Have you also encountered the ECONNREFUSED error - connection refused by server in FileZilla ? Then it's great that you found this guide. I will show you three methods how to fix this FTP error.


The first Method. Changing the Default Value of a FileZilla Port


The cause of the error may be the wrong port when connecting via FileZilla. In this situation, you just need to change the default FTP port to the default SFTP port number . Just change 21 to 22 in the “ Portinput box .




Second Method. Disabling Anti-Virus / Firewall


Sometimes this error can occur when antivirus software and / or the firewall refuses FileZilla's attempt to establish a connection.


In case the antivirus or firewall calls ECONNREFUSED, you just need to disable this software and then reconnect. First I will show you how to do it on macOS:


  • Click on the “ Appleicon in the top menu. Go to “ System Preferences ”.
  • Security & Privacy”.


  • Firewall” “Turn Off Firewall”.



Windows, :


  • Windows “Control Panel”.
  • System & Security” “Windows Defender Firewall”.


  • Turn Windows Defender Firewall on or off”.


  • , Windows “Ok”.

, ().


- «ECONNREFUSED — connection refused by server», .


. FileZilla


, ? , FileZilla:


  • FTP- FileZilla, “Edit” “Network Configuration Wizard”.


  • Firewall and router configuration wizard”, “Next”, .
  • Passive (recommended)”. “Allow fallback to another transfer mode on failure”.


  • Use server's external IP address instead”.
  • Get the external IP address from the following URL”. , ( — URL ip.filezilla-project.org/ip.php), “Next”, .
  • , “Ask operating system for a port” “Next”.

, . “Test”, FileZilla probe.filezilla-project.org. .


, . . ECONNREFUSED , .



. , «ECONNREFUSED — connection refused by server». , FileZilla. , !


All Articles