How to connect to your storage (aws cli, S3cmd, Filezilla)

S3

SFTP

 

S3

You can use any s3 compatible software with our s3 storages (aws cli, s3cmd). 

 

AWS CLI 

Aws cli is a command line interface for managing AWS services.

All the commands are described in the official Amazon documentation.

 

Install AWS CLI 

To install aws cli use this article.

To verify that installation was successfully completed, run aws --version command in the terminal:

$aws --version
aws-cli/1.16.194 Python/3.6.0 Windows/10 botocore/1.12.184

 

Configure storage

After installing aws cli, enter aws configure command. A configuration wizard will be launched.

The wizard will ask to enter the following data:

  • Access Key — enter the access key that you received when creating the storage in the personal account.
  • Secret Key  enter the secret key that you received when creating the storage in the personal account.
  • Default region name — enter the storage region, for example, s-dt2.
  • Leave the rest of the parameters unchanged.

To check that you have configured it right, run the following command:

aws s3 ls --endpoint-url=https://s-ed1.cloud.gcore.lu

Value for --endpoint-url= depends on the storage location and can be found here.

Since there are no buckets in the storage yet, the command won't list anything, but if there are no errors, you have configured the credentials correctly.

 

S3cmd

S3cmd is a command line tool and client for managing data in Amazon S3 storage.

All the commands are described in the official S3cmd documentation

 

Install S3cmd

Open the Download section on the official website, download and install the appropriate version.

 

Configure storage 

Configure with a configuration wizard

After installing aws cli, enter s3cmd --configure command. A configuration wizard will be launched.

The wizard will ask to enter the following data:

  • Access Key — enter the access key that you received when creating the storage in the personal account.
  • Secret Key  enter the secret key that you received when creating the storage in the personal account.
  • S3 Endpoint — enter  the storage URL, e.g. s-dt2.cloud.gcore.lu 
  • DNS-style bucket+hostname:port template for accessing a bucket — enter  the storage URL, e.g. s-dt2.cloud.gcore.lu 
  • Leave the rest of the parameters unchanged.

S3cmd will try to connect to the storage.

If all the data is entered correctly, a message will appear:

Success. Your access key and secret key worked fine :-).

S3cmd will save the entered data in the ~ / .s3cfg file in the following format: 

[default] 
access_key = 09IDGHJ65K5... 
secret_key = E2ZlM4LqNpfahmKg... 
host_base= s-dt2.cloud.gcore.lu 
host_bucket = s-dt2.cloud.gcore.lu 

 

Configure without a configuration wizard

This method allows you to enter configuration data in a line,  without the configuration wizard.

Enter the command:

s3cmd --access_key ZA*****2NIGT --secret_key XA*****1E4X9F --host s-ed1.cloud.gcore.lu --host-bucket s-dt2.cloud.gcore.lu 
  • ZA*****2NIGT is the access key, that you received when creating the storage in the personal account.
  • XA*****1E4X9F is the secret key, that you received when creating the storage in the personal account.
  • s-ed1.cloud.gcore.lu is the storage URL 

 

 

SFTP

Install Filezilla

You can use bash to connect to the SFTP storage. In the example, we use FTP client Filezilla.

To download and install Filezilla use this link.

 

Configure connection

Start by opening up Site Manager:

1564059627462.png

In an open window click on the New Site button:

1564059900721.png

Give it a name and navigate to the General tab on the right.

 

Connect with a password

1564060020832.png

Choose SFTP - SSH File Transfer Protocol in the Protocol field drop-down menu.

In the Host field put the Hostname from the Control Panel, specify port 2200.

Logon Type should be Ask for password.

User is your storage name.

Click on OK to save the changes and Connect to establish a connection to the storage.

 

Connect with a SSH key

1564060046928.png

Choose SFTP - SSH File Transfer Protocol in the Protocol field drop-down menu.

In the Host field put the Hostname from the Control Panel, specify port 2200.

Logon Type should be Key file.

User is your storage name.

For the Key file specify the path to the private key on your computer.

Click on OK to save the changes and Connect to establish a connection to the storage.

Was this article helpful?
Recently viewed articles