Connecting to your Linux or Unix instance in Amazon Lightsail using SFTP

in #sftp5 years ago

You can transfer files between your local computer and your Linux or Unix instance in Amazon Lightsail by connecting to your instance using SFTP (SSH File Transfer Protocol). To do this, you must get the private key for your instance, and then use it to configure the FTP client. This tutorial shows you how to configure the FileZilla FTP client to connect to your instance. These steps may also apply to other FTP clients.

Contents

Prerequisites

Get the SSH key for your instance

Configure FileZilla and connect to your instance

Prerequisites
Complete the following prerequisites if you haven't already:

Download and install FileZilla on your local computer. For more information, see the following download options:

Download FileZilla Client for Windows

Download FileZilla Client for Mac OS X

Download FileZilla Client for Linux

Get the public IP address of your instance. Sign in to the Lightsail console, and then copy the public IP address that is displayed next to your instance, as shown in the following example:

The public IP for an instance in Lightsail.
Get the SSH key for your instance
Complete the following steps to get the default private key for the AWS Region of your instance, which is required to connect to your instance using FileZilla.

Note

If you’re using your own key pair, or you created a key pair using the Lightsail console, locate your own private key and use it to connect to your instance. Lightsail does not store your private key when you upload your own key or create a key pair using the Lightsail console. You cannot connect to your instance using SFTP without your private key.

Sign in to the Lightsail console.

Choose Account on the top navigation bar, and then choose Account from the drop-down.

Choose the SSH Keys tab.

Choose Download next to the default private key for the region where your instance is located.

SSH keypairs in the Lightsail console.
Save your private key in a secured location on your local drive.

Configure FileZilla and connect to your instance
Complete the following steps to configure FileZilla to connect to your instance.

Open FileZilla.

Choose File, Site Manager.

In the Protocol dropdown, choose SFTP – SSH File Transfer Protocol.

In the Host text box, enter or paste your instance’s public IP address.

In the Logon Type dropdown, choose Key File.

In the User text box, enter one of the following default user names depending on your instance operating system:

Amazon Linux, FreeBSD, and openSUSE instances: ec2-user

CentOS instances: centos

Debian instances: admin

Ubuntu instances: ubuntu

Certified by Bitnami instances: bitnami

Plesk instances: ubuntu

Next to the Key File text box, choose Browse.

Locate the private key file that you downloaded from the Lightsail console earlier in this procedure, and then choose Open.

SFTP configuration in FileZilla.
Choose Connect.

You are successfully connected if you see status messages similar to the following example:

FileZilla successfully connected to an instance in Lightsail.

Sort:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-to-linux-unix-instance-using-sftp