In this tutorial we will explain how to connect to your Amazon Web Services EC2 instance trough SFTP using an FTP client, in this case FileZilla which is free, and open source.
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, you just need to take a few more steps before you can connect.
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 might not require you to convert the file, hence it will not prompt you for conversion when you select the file.
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.
Video on how to connect with FileZilla
The below is a video showing how the steps mentioned in the above tutorial can be carried out. Have fun!