SFTP Delivery Method

The preferred method for file transfer protocol (FTP) delivery is the SFTP secure delivery method. The SFTP delivery method allows an exported file to be delivered to an external system and is often used when the output files are large or when a different or remote system is in use.

The SFTP delivery method allows use of Ed25519, ECDSA, RSA-SHA2-256, and RSA-SHA2-512 cryptographic keys and includes an automatic 30-second timeout to prevent indefinite attempts. A dropdown selection is available for the 'Host name' and the 'SSH private key' parameters to ensure correct entries.

To use this method in an OIEP, refer to the SFTP Delivery Method topic.

The SFTP (Deprecated) Delivery Method allows only RSA encryption, does not feature timeout capability, and parameters require that text be manually entered.

For information on the FTP delivery method, refer to the FTP Delivery Method topic.

Prerequisites

Multiple entries can be added to the dropdown parameters using dynamic properties. Each configuration entry must have a unique integer or alpha identifier (indicated by [*]) as described below. When duplicate identifiers exist, only the last value is displayed in the dropdown.

Configure data for the following dropdown parameters:

  1. Host name. Prior to configuration, the Host name dropdown parameter is blank. Provide a selection for the dropdown parameter via the case-sensitive SFTP.DeliveryHostname.[*] dynamic configuration property. As an example:

    SFTP.DeliveryHostname.1=sftp.acme.com
    SFTP.DeliveryHostname.2=sftp.zenithco.com

    Using this configuration property example, two host names are displayed in the 'Host name' dropdown parameter.

  2. SSH private key. Prior to configuration, the SSH private key dropdown parameter is blank. Provide a selection for the dropdown parameter via the case-sensitive SFTP.SshPrivateKey.Location.[*] dynamic configuration property. As an example:

    SFTP.SshPrivateKey.Location.rsa=/users/helm/Documents/sftp/rsakey
    SFTP.SshPrivateKey.Location.ecdsa=/users/whel/Documents/sftp/ecdsakey
    

    Using this configuration property example, two private keys are displayed in the 'SSH private key' dropdown parameter.

Configuration

For information on a parameter, hover over the parameter label to display help text.

  1. In Select Delivery Method, choose SFTP from the dropdown.

  2. For the In Host name parameter, choose the host name of the SFTP server to be used for the delivery from the dropdown.

  3. For the In User name parameter, enter the user name that has access to log on to the FTP server.

  4. For the In Password parameter, enter the password that will be used to log on to the FTP server. If using the SSH Key, leave this field blank.

  5. For the In SSH private key parameter, enter the full path to the Secure Shell (SSH) key file, if applicableusing. If you added a password in the Password field, leave this field blank.

  6. For the In Passphrase parameter, enter the passphrase that accompanies the SSH key entered, if applicable. If the SSH key does not have a passphrase or you are not using an SSH key, leave this field blank.

  7. For theIn File name template parameter, to create the file name used for the output, enter template variables (identified with a $), static text, or use a combination of both. The default template is $filename-$timestamp(yyyy-MM-dd_HH.mm.ss).$extension. Depending on the settings of the configuration, the default template outputs a file name similar to 'GenericXML-2020-07-30_14.07.44.xml.' The hyphens (-), underscore (_), and the periods (.) are characters that are used to build the complete name of the exported file. Each variable is described below:

    • $filename: This variable is replaced with text to indicate the format of the delivered file as specified in the Select Format step. For example, the output file name would include the text 'excel' or 'GenericXML' for those formats. Using the default file name template, a comma-separated value file would be named 'csv-1490808860412.csv' and 'GenericXML-1490810861593.xml' would indicate that Generic XML was used.

    • $timestamp: This variable is replaced with the time in year-day-month-hour-minutes-seconds-milliseconds, excluding the dashes. For example, 20161511094709625 is used for an export on 15 NOV 2016 at 9:47:09:625 AM.

      Adding a definition for the arrangement of the date / time elements provides a way to generate a more readable date. Static characters can be included to separate the timestamp elements and individual elements can be ordered as required, as shown below.

      Note: To revert the $timestamp variable so that it uses the legacy definition (milliseconds between January 1, 1970, and the time when the file is uploaded), contact Stibo Systems Support.

      $timestamp(ddMMyyyy): The timestamp is modified to display day-month-year (excluding dashes) and is output as '15112016' for 15 NOV 2016.

      $timestamp(yyyy-MM-dd_HH.mm.ss): The timestamp is modified to display year-month-day_hour.minutes.seconds (including the dashes, underscore, and periods) and is output as '2016-11-15_09.32.43' for 2016 NOV 15 at 9:32.43 AM.

      Note: The File Name Template does not support conversions of file formats and can only be used to deliver files in the format specified in the configuration.

    • $extension: This variable is replaced with the extension of the output file based on the selected format. For XML-based formats, the output file is set with the .XML extension, while Excel files use .XLS, and comma-separated values use .CSV.

      Important: When a file needs to be sent to a specific directory, the full file path must be added to the front of the file name template, e.g., /upload/hotfolders/GDSN Receiver Inbound/In/$filename-$timestamp(yyyy-MM-dd_HH.mm.ss).$extension.

  1. In Zip before upload, select an option from the dropdown to specify if the output file should be delivered in a .ZIP (compressed) file format.

    • Yes uses the File Name Template and the extension .ZIP. When a file is zipped, the File Name Template is used for the .ZIP file. The $filename template is replaced with 'result_0', and the selected file type is compressed with the name 'exported.' For example, a zipped STEPXML output with the default File Name Template exported on 15 NOV 2016 results in an output .ZIP file named 'result_0-1479230247017.zip.'

    • No uses the File Name Template for the file name along with the appropriate extension for the selected data format.

  2. In Export Process Template, leave the default setting, which is required to start the background process for the export.

  3. Click the Finish button to complete the wizard and begin the export as described in Running a Data Export.