A blog for technology, SEO tips, website development and open source programming.

Accessing Amazon EC2 with SFTP

1 1,449

Accessing EC2 via ssh is the best option in my opinion for developers but sometimes people with minimal development skills needs to access web servers to upload images, videos, audio etc. with tools such as Filezilla, Cyberduck and WinScp.  The post will demonstrate how to access Amazon EC2 via SFTP protocol.

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction.

Steps

Go to the AWS management console

  1. First, find out which security groups your EC2 instance is a member of.
  2. Then find out which inbound connections are allowed for those security groups.
  3. You need to find/add a rule that allows port 22(SSH) from your IP address.
  4. This source IP will allow all SSH requests from anywhere: 0.0.0.0/0.

FileZilla SFTP

  1. Edit (Preferences) > Settings > Connection > SFTP, Click “Add key file”
  2. Browse to the location of your .pem file and select it.
  3. 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.
  4. 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.
  5. File > Site Manager Add a new site with the following parameters:Host: Your public dns name of ec2 instance, or the public ip address of the serverProtocol: 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. 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.

1 Comment
  1. […] How to access Amazon EC2 via SFTP protocol? […]

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More