FileZilla — SFTP to EC2

Beginner
⏱️ 7 min read
📚 Updated: Aug 2025
EC2 / SFTP / FileZilla

What you’ll learn

Amazon EC2 instances are remote Linux servers. FileZilla is a free desktop client that supports SFTP, so you can drag-and-drop files without mounting disks manually.

This guide configures FileZilla Site Manager with your instance public DNS or IPv4, the correct OS login name, and your private key for authentication.

EC2 and FileZilla at a glance

  • Amazon EC2 — virtual machines in the cloud. You SSH (or SFTP) using a key pair created at launch time.
  • FileZilla — graphical client for FTP, FTPS, and SFTP. For EC2, always pick SFTP so traffic uses the SSH service on port 22.

Before you connect

Gather these four items before you open Site Manager—SFTP reuses the same host, port, user, and key material as SSH with PuTTY.

Host & state

The instance must be running. Copy Public IPv4 address or Public IPv4 DNS from the EC2 list view. For a stable address between stop/start cycles, attach an Elastic IP.

Security group

Inbound TCP 22 (SSH) must allow your current public IP or a trusted range. SFTP uses the same port as SSH. If PuTTY works, FileZilla usually will too.

Private key

Use the .ppk from PuTTYgen on Windows, or a .pem / OpenSSH key if your FileZilla build accepts it. Only .pem? Convert to .ppk in PuTTYgen before choosing the key file in Site Manager.

SSH username

Must match the AMI defaults (case-sensitive).

  • Ubuntuubuntu
  • Amazon Linuxec2-user

Example: a running Ubuntu instance in the EC2 console (your IDs and names will differ).

EC2 instances list with instance in running state
Amazon EC2

Install FileZilla

Download the client from the official site (choose the standard FileZilla Client installer for your OS):

FileZilla Client downloads

Configure FileZilla Site Manager

Open FileZilla, then File → Site Manager (or the toolbar icon). Create a New site and apply the following.

  1. Create a new site entry.

    FileZilla Site Manager with New Site
    FileZilla
  2. Set connection parameters:

    1. ProtocolSFTP (not FTP).
    2. Host — your instance Public IPv4 address or Public IPv4 DNS (see next step).
    3. Port22 (default for SFTP/SSH).
    4. Logon TypeKey file (or the option your version offers for key-based auth).
    5. Userubuntu for Ubuntu AMIs, ec2-user for many Amazon Linux AMIs (see below).
    6. Key file — browse to your private key (.ppk or supported .pem).
    FileZilla Site Manager SFTP host user and key file
    FileZilla
  3. Find the public DNS or IP in the EC2 console:

    1. Open Instances and select your instance.
    2. Choose Connect.
    3. Open the SSH client tab and copy the hostname shown there (or read Public IPv4 address from the details pane).
    EC2 Connect dialog showing SSH hostname and user
    Amazon EC2
  4. Confirm the SSH username on the same SSH client tab (it matches what you type in FileZilla).

    1. Open Instances, select the instance, then Connect.
    2. Use the SSH client tab for the example user and command.
    EC2 Connect SSH client tab with default username
    Amazon EC2
  5. In Site Manager, choose Connect (or connect from the toolbar after selecting the site). Accept the host key prompt the first time if it appears.

    FileZilla connected to EC2 showing remote file listing
    FileZilla

    You should see the remote home directory (for example /home/ubuntu) in the right-hand pane. You can now upload and download files.

Troubleshooting

  • Connection refused / timeout — verify the instance is running, has a public IP or DNS path, and the security group allows inbound TCP 22 from your current public IP.
  • Authentication failed / wrong key — confirm the username matches the AMI, and that the private key matches the public key on the instance. Try PuTTYgen to convert .pem to .ppk if FileZilla rejects the key format.
  • Permission denied on upload — you may need to upload to your home directory first, then sudo mv into system paths (for example /var/www), or adjust ownership with chown for app folders.

Key takeaways

1

Use SFTP on port 22 with the same key and user you would use for SSH.

2

Host can be public IPv4 DNS or the Elastic IP address if you associated one.

3

Pick ubuntu or ec2-user (or the user shown in EC2 Connect) so authentication lines up with the AMI.

Frequently asked questions

Use SFTP. Standard Amazon Linux and Ubuntu images expose SSH (port 22), not anonymous FTP. SFTP reuses that secure channel.
Recent FileZilla builds on some platforms can use OpenSSH-format keys. On Windows, converting the key to .ppk with PuTTYgen is still a reliable path. Always protect private keys and never share them.
Yes. SFTP runs over SSH, so the connection is encrypted and authenticated with your server keys and client credentials.

Next: deploy Node.js

With SFTP working and Node installed, copy your project files to the instance and follow the Node.js on EC2 guide for PM2 and port setup.

Deploy Node.js on EC2 →
Did you know?

FileZilla is a widely used open-source client for FTP, FTPS, and SFTP. For EC2, SFTP rides over the same SSH port (22) as shell access, so your security group must allow SSH from your IP (or your chosen source) for transfers to succeed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful