
File system Uploads
CertifiedUpload multiple files via SFTP
File system Uploads
Upload multiple files via SFTP
Uploads each provided file to the target directory. Defaults: port 22, user home as root, password auth unless a PEM key is provided, host key checking disabled by default.
type: io.kestra.plugin.fs.sftp.UploadsExamples
Upload files using a list of URIs
id: fs_sftp_uploads
namespace: company.team
inputs:
- id: file1
type: FILE
- id: file2
type: FILE
tasks:
- id: uploads
type: io.kestra.plugin.fs.sftp.Uploads
host: localhost
port: "22"
username: foo
password: "{{ secret('SFTP_PASSWORD') }}"
from:
- "{{ inputs.file1 }}"
- "{{ inputs.file2 }}"
to: "/upload/dir2"
Upload only files matching a regex (e.g. .sql files)
id: fs_sftp_uploads_regexp
namespace: company.team
tasks:
- id: uploads
type: io.kestra.plugin.fs.sftp.Uploads
host: sftp.example.com
port: "22"
username: foo
password: "{{ secret('SFTP_PASSWORD') }}"
from:
- "{{ outputs.step1.uri }}"
- "{{ outputs.step2.uri }}"
regExp: ".*\\.sql$"
to: "/remote/path"
Upload files with custom destination filenames using a map
id: fs_sftp_uploads_with_names
namespace: company.team
inputs:
- id: file1
type: FILE
- id: file2
type: FILE
tasks:
- id: uploads
type: io.kestra.plugin.fs.sftp.Uploads
host: localhost
port: "22"
username: foo
password: "{{ secret('SFTP_PASSWORD') }}"
from:
report.csv: "{{ inputs.file1 }}"
data.json: "{{ inputs.file2 }}"
to: "/upload/dir2"
Properties
from *Requiredstringobject
Files to upload (kestra:// URIs)
Kestra internal storage URIs; accepts a single URI string, a list of URIs, a map of destination filenames to URIs (to preserve original filenames), or a URI pointing to a file that contains URIs.
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
io.kestra.plugin.fs.vfs.List
Enable the RSA/SHA1 algorithm (disabled by default)
Directory URI to list
Remote host
Maximum files to retrieve
Password
Reference (ref) of the pluginDefaults to apply to this task.
List files recursively
Regexp filter on full path
NONELAST_MODIFIED_ASCLAST_MODIFIED_DESCNAME_ASCNAME_DESCSort order applied to the list before maxFiles truncation
NONE (default) preserves the order in which the server returns files. LAST_MODIFIED_ASC/LAST_MODIFIED_DESC sort by last modified date, oldest/newest first. NAME_ASC/NAME_DESC sort alphabetically by file name.
Username
host *Requiredstring
Remote host
to *Requiredstring
Destination directory
enableSshRsa1 booleanstring
falseEnable the RSA/SHA1 algorithm (disabled by default)
keyExchangeAlgorithm string
Key exchange algorithm
Override the KEX algorithm (e.g. diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256).
keyfile string
SSH private key (PEM)
PEM-formatted private key for public key auth. Convert OpenSSH keys with ssh-keygen -m PEM.
maxFiles integerstring
25Maximum files to upload
overwrite booleanstring
trueOverwrite existing files
If false, fails when the destination already exists.
passphrase string
Passphrase for the SSH key
password string
Password
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
port string
22Remote port
proxyAddress string
SFTP proxy address
proxyPassword string
SFTP proxy password
proxyPort string
SFTP proxy port
proxyType string
SFTP proxy type
One of SOCKS5, STREAM, or HTTP.
proxyUsername string
SFTP proxy username
regExp string
Regexp filter on full path
Only source URIs fully matching this regex are uploaded. Example: .*\.sql$.
rootDir booleanstring
trueTreat path as user home root
If true (default), remote paths are resolved relative to the authenticated user's home directory.
username string
Username
Outputs
files array
The fully-qualified URIs that point to the uploaded files on remote