The SFTP component provides access to remote file systems through the FTP and SFTP protocols. Operation only in passive mode.
URI syntax: sftp:host:port/directoryName
Path parameters
Name | Description | Default | Type |
|---|---|---|---|
host (common) | (required) FTP server hostname. | — | String |
port (common) | FTP server port. | — | int |
directoryName (common) | Initial directory. | — | String |
Query parameters
Name | Description | Default | Type |
|---|---|---|---|
username (security) | Username for authentication on the SFTP server. | — | String |
password(security) | Password for authentication on the SFTP server. | — | String |
fileName(common) | Used to dynamically set the file name as an expression. In the consumer, serves as a name filter; in the producer, to evaluate the file name to write. | — | String |
passiveMode (common) | Defines that the SFTP connection should use passive mode. | false | boolean |
The flow is triggered by a Quartz trigger, which fires every minute.
When the flow starts, the message body is set to Hello World.
Next, the flow sends this message as a file named helloworld.txt to an SFTP server at address demo.wftpserver.com, on port 2222, in the /upload directory.


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_hostsfile. To do this, it is necessary to:
- Include the
known_hostsfile as a resource in the integration.- Configure the
knownHostsFileparameter pointing to the file.- Enable the
strictHostKeyCheckingparameter.Read more about Resources files.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more