
File system List
CertifiedList files in an SFTP directory
File system List
List files in an SFTP directory
Lists entries under the given path with optional regexp filter. Sorted with sort (default NONE) before maxFiles truncation. 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.ListExamples
id: fs_sftp_list
namespace: company.team
tasks:
- id: list
type: io.kestra.plugin.fs.sftp.List
host: localhost
port: "22"
username: foo
password: "{{ secret('SFTP_PASSWORD') }}"
from: "/upload/dir1/"
regExp: '.*/dir1/.*\.(yaml|yml)'
sort: NAME_ASC
Properties
from *Requiredstring
Directory URI to list
host *Requiredstring
Remote host
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 retrieve
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
recursive booleanstring
falseList files recursively
regExp string
Regexp filter on full path
rootDir booleanstring
trueTreat path as user home root
If true (default), remote paths are resolved relative to the authenticated user's home directory.
sort string
NONENONELAST_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 string
Username
Outputs
files array
The list of files
io.kestra.plugin.fs.vfs.models.File
date-timeFOLDERFILEFILE_OR_FOLDERIMAGINARYurifalsedate-time