SFTP
Overview
Secure File Transfer Protocol (SFTP) is a network protocol used for securely accessing, transferring, and managing large files and sensitive data. It was designed by the Internet Engineering Task Force (IETF) for secure data transfers over Transport Layer Security (TLS). SFTP uses the Secure Shell (SSH) protocol to encrypt data and authenticate connections, ensuring commands and data are encrypted to prevent sensitive information from being exposed in plain text.
Leena AI uses SFTP as a standard client-server architecture to securely access and transfer data over the Internet.
API Details
Leena AI uses SFTP as a standard client-server architecture.
Setup
Prerequisites
Before attempting to connect, ensure the following are in place:
- Active SFTP Server Access: You must have an active and reachable SFTP server instance.
- Firewall Configuration: The firewall on the client's network or the SFTP server must be configured to allow outgoing/incoming traffic on the standard SFTP port (Port 22) or any custom port used.
- SSH Key Pair (if applicable): If using key-based authentication (Username and Private Key), ensure you have the corresponding Private Key file ready and that the matching Public Key is installed on the SFTP server for your user account.
- User Permissions: The provided SFTP user account must have the necessary read, write, create, and delete permissions on the specified remote directories for the intended actions to succeed.
Get Credentials
You must provide an SFTP Host IP Address/domain and Port 22.
Authentication can be configured using any of the following three options:
- Username and Password
- Username and Private Key
- Username, Password and Private Key
Add Connection
- Provide an ID and Name for your connection. The ID is used to identify the connector in the workflow.
- Enter the Host IP address or domain.
- Enter the Port, which is typically 22.
- Select the Auth Type based on your credentials (e.g., Username, Password and Private Key).
- Enter the corresponding Username, Password, and Private Key fields based on the selected Auth Type.
- Click Submit to save the connection.
Actions
The SFTP connector supports the following actions:
Create Folder
This action will create a new folder/directory at a specified path.
Input Parameters
| Field | Requirement | Description | Example |
|---|---|---|---|
| Folder Path | Mandatory | Path where the folder needs to be created. | sftp://[email protected]//home/user |
| Create Recursively | Optional | [NO DESCRIPTION FOUND IN PROVIDED DOCUMENTATION - Content is blank] | [NO EXAMPLE FOUND IN PROVIDED DOCUMENTATION - Content is blank] |
List Folder (List files & folders)
This action will list all files and folders in the given folder path.
Input Parameters
| Field | Requirement | Description | Example |
|---|---|---|---|
| Folder Path | Mandatory | Path from where files and folders need to be listed. | sftp://[email protected]//home/user |
Read File
This action will allow a user to read a specific file from a specified path.
Input Parameters
| Field | Requirement | Description | Example |
|---|---|---|---|
| Complete file Path | Mandatory | Path from where the file needs to be fetched. | sftp://[email protected]//home/user/expenses.csv |
| Convert to JSON | Optional | If enabled, an Excel or CSV file content is returned as a JSON body. | True |
| Return Base64 | Optional | If enabled, a Base64 URL is returned for the file. | True |
Other Supported Actions
| Action Name | Description |
|---|---|
| Delete File | Delete the file from the specified file path. |
| Delete Folder | Delete the folder from the specified folder path. |
| Get File Info | Get the file information of the specified file. |
| Move File | Move a File from one path to another. |
| Search for a File | Search for a File/Text from a specified path. |
Updated about 19 hours ago
