On this page

Saving to SFTP Storage

Introduction

This tutorial is designed to guide you through saving files to an SFTP (SSH File Transfer Protocol) server, a secure method for file transfer over a network.

Upon completing this tutorial, you will be proficient in setting up a destination object for SFTP file transfer, including configuration for both password and private key authentication.

Supported Protocols

ProtocolDescription
sftp://SSH File Transfer Protocol

1
Setting Up an SFTP Server

  1. Choose SFTP server software (like OpenSSH) and install it on your server.
  2. Configure the server, including user accounts and access permissions.

2
Finding Your SFTP Credentials

  1. For password authentication, use your server account username and password.
  2. For key-based authentication, generate an SSH key pair and configure the public key on the server.

Destination Object Structure

"destination": {
  "url": "sftp://hostname_or_ip/path",
  "key": "username",
  "secret": "password or private key"
}

Attributes of SFTP Destination Object

AttributeDescription
urlYour SFTP Destination URL. Includes the hostname or ip, port if applicable, and path.
keyYour Wasabi storage account name.
secretYour Wasabi storage account key.
permissionsSpecifies object access permissions. The default value is ‘private’ meaning the object is not publicly accessible with its URL. In case you want your objects to be accessed publicly, specify ‘public-read’ as a value for permissions.

URL Structure for SFTP

The SFTP url consists of a hostname or IP address, port, and path. Check the examples for single file and ABR formats like HLS and DASH below:

sftp://[hostname_or_ip][:port]/[path]

When saving ABR outputs like HLS or DASH, please specify the path to a folder where the contents of the HLS or DASH stream should be located:

sftp://[hostname_or_ip][:port]/folder

Components of URL
hostname_or_ipThe IP address or hostname of your SFTP server.Optional. The default port for SFTP is 22.
portOptional. The port number.
pathPath within your bucket where the file will be saved.

Destination Object Example

"destination": {
  "url": "sftp://example.com/my-folder/output.mp4",
  "key": "myUsername",
  "secret": "myPassword"
}

"destination": {
  "url": "sftp://example.com/my-folder/output.mp4",
  "key": "myUsername",
  "secret": "ssh_rsa_key:-----BEGIN RSA PRIVATE KEY-----\nMIIEo...V7Q==\n-----END RSA PRIVATE KEY-----"
}

When saving ABR outputs like HLS or DASH, please specify the path to a folder where the contents of the HLS or DASH stream should be located:

"destination": {
  "url": "sftp://example.com/my-folder",
  "key": "myUsername",
  "secret": "myPassword"
}

Considerations for SFTP

Generating an SSH Key Pair (for Key-based Authentication)

  1. Use a tool like ssh-keygen to generate a new SSH key pair.
  2. Store the private key securely and add the public key to the SFTP server.
  • Security: SFTP is secure by default as it operates over SSH.

  • Key-based Authentication: It is recommended for enhanced security.

  • Connection Issues: Verify the server's IP, port, and authentication details.

  • Key-based Authentication: Ensure the public key is correctly set up on the server.