FTP Client Setup for EC2 Instance

Prerequisites

> Creating and connecting to an AWS EC2 instace

FileZilla is a free, open-source FTP (File Transfer Protocol) client that allows users to transfer files between their local computers and remote servers. It provides a user-friendly interface and supports various operating systems, including Windows, macOS, and Linux.

FileZilla offers both an FTP client and an FTP server, enabling users to upload, download, and manage files on remote servers. It supports secure file transfers using protocols such as FTPS.

The software allows users to establish connections with remote servers by entering the server's address, port, and login credentials. Once connected, users can navigate the local and remote file systems, drag and drop files between them, and perform operations like uploading, downloading, renaming, deleting, and creating directories.

Install Filezilla

Go to the official site of Filezilla and download the Filezilla client that matches with you operating System. Installation steps may vary depending on system you are using, however it's very straightforward in any case.

After installation completes, you will see a UI very similar to this one:

Setting FTP Connection

When using an EC2 instance, one of the most recomended authentication methods is by using a pem key. Therevy, we're gonna use this key when setting our FTP connection. In order to do so, follow below steps

  1. Go to Site Manager by clicking on top left corner icon that shows three servers
  2. From Stie Manager window, click on "My Sites", click on "New site" button and type the any name you like for the new site connection
    1. On the right pane, from "General" tab, select "SFTP - SSH File Transfer Protocol on Protocol drop down list
    2. Copy and Paste your EC2 public IP DNS on Host input and leave port empty (Rememebr you can get this IP from the EC2 instances dashboard)
    3. In "Logon Type" select "Key File"
    4. Type the user for which the pem file was created for (default user name use to be ec2-user)
    5. Finally, browse for the location where you pem file resides
    6. Click on "Connect" button
  3. After connections gets stablished, you will see the "Remote site" pane on the right populated with the folder tree of your EC2 machine

Using and Configuring the FTP client

At this point you can download, upload, delete and edit any file or folder on your remote machine by just right clicking and a file and selecting the operation we want.

However, one important setup is selecting a different editor for the remote files just like if we were editing files from our local computer. In order to achieve this, go to Filezilla -> Settings -> File editing and browse for the application you want to use as default editor. After this when you right click a file in EC2, and selecting View/Edit, the file will opened in editor we choose earlier (like VS Code for example) and every time you save the file in your computer, the changes will be synced on the remote machine.