In this tutorial, it will be explained 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. When connecting to a server in the cloud, you typically need to use SFTP. This is not really difficult, it just requires a few more steps than needed using FTP.
Before you will be able to connect to your instance, you will first need the following:
- The keyfile you created when launching your instance
- The Public DNS for your instance
- Username and Password
- 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
Step 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
Step 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.
The keyfile fill automatically be picked by FileZilla when connecting to the instance it is meant for, so you do not need to do anything special when setting up your instance in FileZilla.
Step 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.