1. Home
  2. ...
  3. Triggers
  4. t SFTP

t SFTP

Available triggers

The SFTP component provides access to remote file systems through FTP and SFTP protocols.

URI Syntax: sftp:host:port/directoryName

Main fields

Path parameters

Name
Description
Default
Type
host (common)(required) Hostname of the FTP server.—String
port (common)Port of the FTP server.—int
directoryName (common)Initial directory.—String

Query parameters

Name
Description
Default
Type
username (security)Username for SFTP server authentication.—String
password(security)Password for SFTP server authentication.—String
fileName(common)Used to dynamically set the file name as an expression. In the consumer, it serves as a name filter; in the producer, to evaluate the filename to write.—String
passiveMode (common)Defines that the SFTP connection should use passive mode.falseboolean
includeExt (filter)Used to include files matching the file extension name (case-insensitive). For example, to include .txt files, use includeExt=txt. Multiple extensions can be separated by commas; for example, to include .txt and .xml files, use includeExt=txt,xml.—String
delay (scheduler)Milliseconds before the next poll.500long

Example

The flow reads .txt files from a specified SFTP server every 10 seconds, using a username and password for authentication.

Then, the content is displayed in a log.

NOTE

The component does not delete files that have already been processed, as the server operates in read-only mode.

Result

NOTE
  • The connection configured in the example does not validate the SFTP server's identity, which means it would not detect potential security issues.

  • For secure validation, Apache Camel allows using a known_hosts file. To do this, you need to:

    1. Include the known_hosts file as a resource in the integration.
    2. Configure the knownHostsFile parameter pointing to the file.
    3. Enable the strictHostKeyChecking parameter.

Read more about Resources files.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more