Connect to AWS EC2 instances with FileZilla

This tutorial shows how you can connect to an AWS server instance using a FTP client.

8941 views
d

By. Jacob

Edited: 2019-12-15 12:11

In this tutorial, I show how to connect to AWS EC2 instances using SFTP in FileZilla.

SFTP stands for Secure File Transfer Protocol, but it is also known as SSH File Transfer Protocol. You should not confuse SFTP with FTP and FTP with TLS encryption, as they are different.

When connecting to a server on the internet, you typically need to use either SFTP or FTP. Ideally, you will use a secure connection, such as either SFTP or FTP with TLS encryption. This is not really difficult, it just requires a few more steps than needed when using plain old FTP.

Before you will be able to connect to your instance, you will first need the following:

  1. The keyfile you created when launching your instance
  2. The Public DNS for your instance
  3. Username and Password
  4. You might also need to convert your .pem keyfile to a format that FileZilla accepts.

Note on 4: New versions of FileZilla is able to handle .pem files.

Connecting to your AWS EC2 instance using SFTP

1. (convert your keyfile): When you select the .pem file from within FileZilla, it should automatically be converted to .ppk.

You include and convert the keyfile in Edit->settings...->SFTP

2. (find your instances' public dns): The public dns for your instance can be found in the AWS console by selecting the instance that you want to connect to, the different details about the instance should show up after selecting the instance.

Alternatively, you may also be able to connect by using your domain name or the external IP address of the server.

The keyfile will automatically be picked by FileZilla when connecting to the instance it is meant for, so you do not need to do anything special to remember it when setting up your instance in FileZilla.

3. (Setup your instance in site manager): When setting up your instance in FileZilla, make sure to choose the Normal logon type, and then simply use the password that you created for your instance. The default username is ubuntu for ubuntu servers.

For the port number, just leave it blank, and FileZilla will automatically choose the default port number for whatever protocol you use to connect, in this case SFTP (22).

The protocol should be changed to SFTP - SSH File Transfer Protocol.

As the host, use the public dns for the EC2 server instance that you want to connect to.

Video

Tell us what you think:

  1. In this article I will explain how to enable a swapfile on small instances, and why it might be useful, even if you do have enough physical memory.
  2. With some network configurations, TLS/SSL might break when relaunching an EC2 instance from an AMI backup.
  3. How to configure a SMTP server with letsencrypt on an amazon EC2 instance.
  4. How to have multiple public IPs with one AWS EC2 Instance
  5. If you suddenly can not connect to your server in the cloud for no apparent reason, it may be because it is running out of physical memory. In this article, I will discuss a few solutions to this problem.

More in: AWS