Filezilla is a popular desktop software that we use to upload files on server using FTP protocol. Because it’s user interface is user friendly and you can upload any file by just drag and drop method. Now the question is, how can we upload files on AWS ec2 server using this software. Because ec2 instance doesn’t have any password to logon. Instead, it has a private key that you can download from ec2 dashboard. Let’s figure out how to upload file on aws ec2 instance using FileZilla.
Before starting, we assume that you have the following things in your hand.
- One ec2 server up and running
- You have it’s host address or Public IP address
- You have it’s private key in PPK format
- FileZilla installed on your local computer
Note for prerequisite #2: Most likely you have private key in pem format instead of ppk format. To convert a pem private file to ppk you can use putty software. Putty can be installed on both windows and linux computer. For more information to convert the file click here.
Important note for prerequisite #2: Make sure that, the private key file’s permission is set to 400.
Login and upload file on AWS ec2 instance using FileZilla
- Open Filezilla
- Open site manager (File > Site Manager or Ctrl + S)
- Click on New Site Button from bottom right corner of Site Manager dialog box.
- Enter the site name whatever you wish (I named it AWS_Training)
- On the right side of the dialog box, you will see a box with label Host: Enter public IP or host address of the ec2 instance
- From protocol dropdown box, select “SFTP – SSH File Transfer Protocol”
- In Logon Type dropdown box select “Key file”
- In User text box, type ec2-user
- Below user textbox, you can see a box named Key file. Here you press Browse button (left size of the box) and select the private key file in ppk format.
- Now press Connect. If everything goes okay, then you can successfully login to the ec2 instance and upload file
- Press okay to come out of the Site Manager dialog box
Now you can use this site configuration to login and upload files on ec2 instance.