SFTP TP List
AI-generatedSummary
List the contents of a specified remote directory on an SFTP server supporting legacy SSH algorithms, with optional filtering and output formatting.
Inputs
- remoteDir (required) — Specifies the absolute path of the remote directory to list.
- output (required) — Determines the output format: either one item per entry or a single item containing all entries as an array.
- options.pattern — Filters entries by filename using a glob pattern (e.g., 'report_*.csv'); if empty, all entries are listed.
- options.includeDirectories — Includes directory entries in the listing; defaults to false, listing only files.
- options.includeSymlinks — Includes symbolic link entries in the listing; defaults to false.
- options.skipMissing — If true, emits an empty listing instead of failing when the remote directory does not exist.
- sshOptions.kex — Additional key exchange algorithms to negotiate with legacy SSH servers (comma-separated). Defaults to preset legacy values if not set.
- sshOptions.serverHostKey — Additional host key algorithms to support legacy servers (comma-separated). Defaults to preset legacy values.
- sshOptions.cipher — Additional cipher algorithms to support older servers (comma-separated). Defaults to preset legacy values.
- sshOptions.hmac — Additional HMAC algorithms to support legacy servers (comma-separated). Defaults to preset legacy values.
- sshOptions.ident — Custom SSH client identification string to use when connecting, useful if the server rejects unknown clients.
- sshOptions.readyTimeout — Timeout in milliseconds for establishing the SSH connection; default is 20000 ms.
- sshOptions.debug — If true, outputs SSH handshake debug logs to n8n logs.
Output shape
an array of JSON items representing directory entries
If 'output' is 'oneItemPerEntry', each item corresponds to a single file, directory, or symlink entry with metadata. If 'output' is 'arrayInOneItem', a single item contains an 'entries' array of all entries. On missing directories with 'skipMissing' true, returns an empty entries array with a success flag. Errors cause node failure unless 'Continue On Fail' is enabled, in which case an item with success=false and error message is returned.