SFTP
Updated July 5, 2022
SFTP provides managed, serverless SFTP infrastructure. Trading partners can use it to exchange files without having to worry about setting up servers.
How it works
Your Stedi account gives you access to an SFTP server hosted by Stedi. All you need to do is create a user with the API. A user only has access to files that are under the directory you assign to them.
Use Cases
Here are some common use cases for SFTP.
- Exchange files with your trading partners. Create an SFTP user with a unique home directory for each of your trading partners, and share the credentials with them. They can then upload and download files in that directory via SFTP.
- Process uploaded documents using the Stedi platform. Your SFTP users are backed by a Stedi Bucket, which can be configured to automatically trigger a function whenever a new document is uploaded. See the Stedi Functions (Preview) documentation for more information.
Getting started
Before you can use Stedi SFTP, you need to take care of two things.
- Create a Stedi-account (free and no credit card required).
- Create an API key.
After that, you can get started.
- Create a user with the API.
- Connect to the SFTP server with the information the API returns.
Here's an example of using Stedi SFTP from the command line.
Permissions
SFTP users have a home directory. They can access any file or directory under their home directory, but none outside it. In order to exchange files with your trading partners Alice and Bob, you could provision the following users:
Alice
- description:
Trading partner Alice
- homeDirectory:
/alice
Bob
- description:
Trading partner Bob
- homeDirectory:
/bob
Next, provision a root user which you can use to access files in each of the trading partners’ home directories.
Root
- description:
Root user
- homeDirectory:
/
Alice and Bob will only have access to the files in their home directories. Root will have access to all files, and can be used to upload and download documents for all trading partners.