SFTP Destination
The SFTP destination uploads each processed message as a file to a remote SFTP server. It supports password and private-key authentication and writes to a temporary filename first to prevent downstream systems from reading partially uploaded files.
Configuration
Section titled “Configuration”Add an SFTP destination to a channel in intu.yaml:
destinations: - name: lab-drop type: sftp properties: host: "sftp.lab.example.com" port: 22 directory: "/inbound/hl7" filename_pattern: "${messageId}.hl7"Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
host | string | (required) | Hostname or IP address of the SFTP server. |
port | integer | 22 | SSH port number. |
directory | string | (required) | Remote directory to upload files into. |
filename_pattern | string | ${messageId}.dat | Template for the remote filename. Supports the same variables as the File destination. |
temp_prefix | string | .tmp_ | Prefix added to the filename during upload. Once the transfer completes, the file is renamed to remove the prefix. |
Authentication
Section titled “Authentication”Password
Section titled “Password”auth: type: password username: "${SFTP_USER}" password: "${SFTP_PASS}"Private Key
Section titled “Private Key”auth: type: private_key username: "${SFTP_USER}" key_file: "/etc/intu/keys/sftp_id_rsa" passphrase: "${SFTP_KEY_PASSPHRASE}"The passphrase field is optional — omit it if the key is unencrypted.
Complete Example
Section titled “Complete Example”An SFTP destination that uploads HL7 files with private-key authentication:
destinations: - name: lis-sftp-drop type: sftp properties: host: "sftp.lab.hospital.org" port: 22 directory: "/inbound/results" filename_pattern: "ORU_${date}_${time}_${messageId}.hl7" temp_prefix: ".tmp_" auth: type: private_key username: "intu-service" key_file: "/etc/intu/keys/lab_sftp_rsa"