Wednesday, December 28, 2011

Set up an FTP server on Amazon AWS EC2

You really don't need to set up an FTP server if you simply want to tranfer files between your EC2 instance and your local machine. You can use PSFTP (coming with putty package) with a saved putty session for your EC2 conection. Open a command window, type in psftp your_saved_putty_session_name. Type ec2-user for  login as and you are connected.

If you don't like commandline tool, you can use Filezilla instead. Download and install Filezilla client.  Lauch Filezilla. Click Edit -> Settings and select SFTP under Connction. Click Add Keyfile to add the private key file you use for putty connection. Click OK.

Click File -> Site Manager, Click New Site, enter your AWS EC2's public DNS or IP in Host field. Choose SFTP, enter ec2-user in User field and click Connect.

Now you are connected to your EC2 instance with FileZilla.

If you still want to set up an FTP server on your AWS EC2. Below are steps to install VSFTP.
  1. login to  your AWS management console.
    • Go to EC2 and click the Security Groups link.
    • Then choose the default group and switch to the inbound tab (at the bottom of the page)
    • Add the port ranges as above (20-21 and 40000-41000) and apply the rule changes
  2. connect to your instance with putty.
  3. login as ec2-user
  4. sudo su
  5. yum vsftpd
  6. change the conf file. vim /etc/vsftpd/vsftpd.conf. Add
  7. Add an FTP user (see instruction here)
  8. Start the FTP server. service vsftpd start


  1. This worked flawlessly. Thank you.

  2. Excellent. Thanks for this. Works like a dream.

  3. One of the biggest challenges that organizations face today is having inaccurate data and being unresponsive to the needs of the Amazon AWS Users Email List organization.

  4. Thanks for this great post! - This provides good insight. You might also be interested to know more about generating more leads and getting the right intelligence to engage prospects.
    Techno Data Group implements new lead gen ideas and strategies for generating more leads and targeting the right leads and accounts.
    Amazon AWS Users Email & Mailing List

  5. i was trying to use filezilla to connect with ec2 but it is giving connection timed out error i have done all the configuration but no luck. Should i add anything else to configure on this website end like servers or dns records

  6. Type IFSC code to Know Branch Details of any Bank in India. Find IFSC, MICR Codes, Address of all Bank Branches in India
    search bank by ifsc code