Even on localhost using the ftp command, through the web server on WordPress, on my personal computer through FileZilla, in short, I need my FTP server but it refuses to let anyone connect.
Using SFTP works perfectly, but even when I enable SSL on vsftpd which I think is the same thing, it still doesn't work.
I've followed many tutorials on how to set it up, tried wiping my server multiple times, nothing works.

Using netstat -tlpn returns this result, it seems the process is running but is not listening, even though in the config file listen is set to YES.

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      9563/mysqld     
tcp        0      0    *               LISTEN      972/sshd        
tcp6       0      0 :::58623                :::*                    LISTEN      25429/java      
tcp6       0      0 :::49505                :::*                    LISTEN      25429/java      
tcp6       0      0 :::80                   :::*                    LISTEN      22955/apache2   
tcp6       0      0 :::8080                 :::*                    LISTEN      25429/java      
tcp6       0      0 :::22                   :::*                    LISTEN      972/sshd
  • Could you paste the exact error message that is being shown while trying to connect to the server for ftp? Are all sources getting the same message?
    – heemayl
    Nov 4, 2014 at 16:33
  • All attempted connections are getting the error message: connect: connection refused
    – Wargog
    Nov 4, 2014 at 16:59
  • Have you checked that your ftp server is actually listening on port 21 or any other configured port by netstat or ss or lsof or any other method?
    – heemayl
    Nov 4, 2014 at 17:33
  • No, thats not the command you should be using. Use netstat -tlpn or ss -antu or sudo lsof -i:21 and post the output of any one of them preferably netstat -tlpn and remove your last edit.
    – heemayl
    Nov 4, 2014 at 18:16
  • 1
    Thats exactly what i expected. Your vsftpd is not listening at all. You can be sure that whether the process is actually running or not by using the command ps -ef | grep -i "ftp" or pgrep -l "ftp".
    – heemayl
    Nov 4, 2014 at 18:29

3 Answers 3


The vsftpd service is not running and hence is not listening on port 21 or any preconfigured port. As a result you are getting the connect: connection refused error message every time while using an FTP client to connect to the server. I think you should check the setup procedure and configuration files for sorting out the issues. This and this might be a very good place to start.


This actually turned out to be that SSH SFTP was somehow running on 21 instead of 22. So, if anyone is having the same issue, trying connecting through an SFTP client instead of plain old FTP, still using port 21

  • Vsftpd supports FTP over SSH (aka FTPS) over standard FTP port numbers by default. It does not support SFTP, which is a different protocol. May 23, 2016 at 21:28
  • 6
    @MichaelSteele FTPS is not FTP over SSH, it is FTP over SSL/TLS.
    – heemayl
    Jan 20, 2017 at 14:30

Check your vsftpd.conf file for duplicate entries.

If there's two times the same thing, it would simply not start correctly.



for lines that are properties entries that are duplicated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.