ftpfilezilla

Error: "Failed to retrieve directory listing" when connecting to EC2 server with FTP


I currently have a problem accessing the sites I had pre-configured on my Filezila. The only changes I recently made was adding a secure private key to access my EC2 instance through SFTP.

There are a number of sites that I can no longer access but before I could access

I have checked with another developer who has FTP access to the sites and he has no issue.

I get this error, see below, but it is not for all sites?

I tried deleting that SFTP key but that didn't seem to make any difference.

Any ideas?

enter image description here


Solution

  • You are connecting with the FTP protocol to EC2 with FileZilla.

    SSH/SFTP key has nothing to do with the FTP protocol.

    Moreover you are connected and authenticated already to the FTP server at the point you get the error.

    The problem you are facing is a misconfigured firewall or NAT between you and the server that prevents the client to open data transfer connection to the FTP server.

    See (my) article about FTP connection modes for details.

    Though I guess the real problem is that you used to use the SFTP before and now you switched to the FTP by mistake.

    It's actually not typical to connect to EC2 with the FTP. Linux EC2 servers do not have the FTP by default. Unless that is a Windows server (on the other hand, in that case it won't have SSH/SFTP by default).

    For explanation how to connect to Linux EC2 server with the SFTP see (my) article Connecting Securely to Amazon EC2 Server with SFTP.