Connect to Amazon EC2 file directory using Filezilla and SFTP
I've created a video tutorial for this. Just check:
Connect to Amazon EC2 file directory using FileZilla and SFTP, Video Tutorial
Summary of above video tutorial:
- Edit (Preferences) > Settings > Connection > SFTP, Click "Add key file”
- Browse to the location of your .pem file and select it.
- A message box will appear asking your permission to convert the file into ppk format. Click Yes, then give the file a name and store it somewhere.
- If the new file is shown in the list of Keyfiles, then continue to the next step. If not, then click "Add keyfile..." and select the converted file.
File > Site Manager Add a new site with the following parameters:
Host: Your public DNS name of your EC2 instance, or the public IP address of the server.
Protocol: SFTP
Logon Type: Normal
User: From the docs: "For Amazon Linux, the default user name is ec2-user. For RHEL5, the user name is often root but might be ec2-user. For Ubuntu, the user name is ubuntu. For SUSE Linux, the user name is root. For Debian, the user name is admin. Otherwise, check with your AMI provider."
Press Connect Button - If saving of passwords has been disabled, you will be prompted that the logon type will be changed to 'Ask for password'. Say 'OK' and when connecting, at the password prompt push 'OK' without entering a password to proceed past the dialog.
Note: FileZilla automatically figures out which key to use. You do not need to specify the key after importing it as described above.
If you use Cyberduck follow this.
Check this post if you have any permission issues.
Make sure you use port 22. Filezilla will default to port 21 for SFTP.
If anyone is following all the steps and having no success, make sure that you are using the correct user. I was attempting to use "ec2-user" but I needed to use "ubuntu."
This is very simple if you used your pem file
( I am using macOS / windows users can follow the same steps.)
Just download your FileZilla (I'm using macOS - and downloaded the free version, that's good enough)
Open Site Manager in FileZilla (⌘S) -> New Site
- Put your hostname in the Host field.
Example:
eca-**-**-**-111.ap-southwest-9.compute.amazonaws.com
Select Protocol as SFTP - SSH File Transfer Protocol
Select Logon type as Key File
Put your user name in the User field : for me it's ubuntu (find your ssh user)
Note:
OS vs Username
Amazon - ec2-user
Centos - centos
Debian - admin or root
Fedora - ec2-user
RHEL - ec2-user or root
SUSE - ec2-user or root
Ubuntu - ubuntu or root
- For the Key file field, browse your pem file: and click Connect
- That's all :) have fun!
Note:
(Remember to allow SSH connection to your IP address from EC2) If not you will get connecting error message!
Note: Allowing your IP to connect your AWS instance via SFTP
EC2 -> SecurityGroups -> SSH -> Inbound rules -> Edit -> Add Rule ( SSH|TCP|22|My IP(it's get ip automatically | name for rule) -> Save