|
Description |
An SFTP server to manage files |
|---|---|
|
Type |
sftp |
|
Category |
File |
Configuration in States
The SFTP File Store can be configured directly in the States interface via the Data Stores module. The following configuration mode is available:
Parameters
|
Name |
Description |
Mandatory |
Default |
Comment |
|---|---|---|---|---|
|
Host |
The hostname or IP address of the SFTP server |
Yes |
— |
|
|
Port |
The port of the SFTP server |
No |
|
|
|
Username |
The username used to connect to the SFTP server |
Yes |
— |
|
|
Authentication Mode |
The authentication method: |
Yes |
— |
Determines which fields below are required |
|
Password |
The password used to authenticate (Password auth only) |
Yes, for Password auth |
— |
Value is hidden |
|
Key Path |
Path to the private key file on the Worker's host (Key Pair auth only) |
Yes, for Key Pair auth |
— |
Both RSA and OpenSSH key formats are supported |
|
Key Password |
Password used to decrypt the private key (Key Pair auth only) |
Yes, for Key Pair auth |
— |
Value is hidden |
|
Base Path |
The base directory on the SFTP server |
Yes |
— |
|
Local Configuration
The local configuration is defined in a JSON file (stores.json) deployed directly on the Workers' server. A locally configured store takes priority over a store with the same name configured in the States interface.
|
Name |
Description |
Type |
Mandatory |
Comment |
|---|---|---|---|---|
|
HostName |
Host address of the SFTP |
string |
True |
|
|
Port |
Port of the SFTP server |
int |
FALSE |
Default: 22 |
|
Username |
The user used to connect to the SFTP |
string |
True |
|
|
Password |
In case of authentication using Username / Password: The password to use to log into the SFTP. |
string |
TRUE for Password AUTH |
|
|
KeyPath |
In case of authentication using Keypair: Path of the private key used to connect to the SFTP server |
string |
TRUE for KEY AUTH |
Both usual Linux key formats (RSA & OpenSSH) are supported. |
|
KeyPassword |
In case of authentication using Keypair: Password used to read the private key |
string |
TRUE for KEY AUTH |
|
|
BasePath |
The base directory on the SFTP server |
string |
True |
|
Using key auth
{
"Name": "sftp-server",
"Type": "sftp",
"HealthCheck": true,
"Config": {
"HostName": "sftp.dfakto.com",
"Port": 23,
"Username": "username",
"KeyPath": "./key.pem",
"KeyPassword": "password",
"BasePath": "/"
}
}
Using Password auth
{
"Name": "sftp-server",
"Type": "sftp",
"HealthCheck": true,
"Config": {
"HostName": "sftp.dfakto.com",
"Port": 23,
"Username": "username",
"Password": "Pa$$w0rd",
"BasePath": "/"
}
}