Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content revised

Introduction

This article builds on the Simple File Transfer with Basic Authentication article, concentrating on the configuration aspects introduced with use of SSH authentication.

Note:

  • On our JADE - XML Configuration - Sample Files page there is complete configuration file available for download that uses SSH public/private key authentication. This configuration is a working example that comes with the necessary private key authentication file and will download files from the online SOS Demo server to a local file system.
  • The transfer configuration is described here and in the download example just mentioned uses the XML-based configuration introduced with Release 1.11 of JADE. A similar example using the Settings parameters configuration that was implemented for releases before 1.11 can be found our JADE Tutorials.

Features of SSH Authenticated File Transfer

Authentication

The main features of SSH authenticated file transfer in JADE are:

  • SSH authentication can be carried out with an account name and either a password or a public/private key verification.
  • SSH authentication requires that SFTP protocol is used. 
  • SSH authentication is required when a jump host transfer is carried out.

As with all file transfer protocols, any number of SFTP file transfer configurations in the form of ProtocolFragments can be pre-configured preconfigured and selected as required.

Features of SSH Authenticated File Transfer

...

SSH authentication can be carried out with an account name and either a password or a public/private key verification.

If public/private key verification is used, the SSH password parameter can be used to provide additional protection for the authentication file.

...

Configuration of SSH Authenticated File Transfer
Status
colourYellow
titleDuplicate of Basic Authentication

The configuration of a file transfer with SSH authentication follows the steps already described described in the Simple File Transfer with Basic Authentication article.

In the download example with SSH authentication mentioned in the introduction there are two differences to the Simple File Transfer with Basic Authentication example:

  • the use of SSH Authentication instead of BasicAuthentication
  •  SFTP protocol is used instead of FTP as FTP cannot support SSH authentication

Both examples are otherwise kept in this example is held as simple as possible for clarity. More complex file transfer scenarios will be described later.

...

  1. Configuration of the Fragments - i.e. the protocol, connection and authentication methods to be used for the source and target parts of the operation.
  2. Configuration of the Profile - i.e. the operation to be carried out (e.g. copy or move), the fragments to be used for the source and target parts of the transfer and any specific directories that are to be used.
    • Note that the Profile can also be used to specify other elements such as any notifications to be made or preprocessing that is to be carried out. These will be described later on.
  3. Calling the Configuration and Profile from the command line, a batch file or via the JADE API.

Operations around SFTP file transfer

JADE can carry out the following operations in conjunction with SFTP file transfer:

  • pre- and post-processing operations, both for the source part of the transfer (i.e. pickup) and the target part (i.e. put down)
  • file renaming
  • zlib file compression

...

  1. .

...

Additional transfer features

...

Specification of SFTP File Transfer Elements

The key element in the JADE XML schema for the specification of a file transfer by FTP is the SFTPFragmentRef element. This element is part of the Profiles branch of the schema and a direct descendant of operation source or target elements such as CopySource or MoveTarget. The SFTPFragmentRef element can be specified for the source and/or target parts of the operation.

The SFTPFragmentRef element itself contains a reference to the SFTPFragment to be used for this part of the transfer. SFTPFragment elements are specified in the Fragments branch of the schema and may not be specific to the current transfer operation.
Note that the SFTPFragment reference, which is specified as a name attribute of the SFTPFragmentRef element, is not shown in the XSD schema hierarchy diagram below.

In addition, as shown in the first diagram below, the SFTPFragmentRef element has four child elements that are optional but define aspects of the operation that are SFTP-specific: SFTPPreProcessing, SFTPPostProcessing Rename and ZlibCompression. These elements are described in detail as part of the SFTPFragmentRef below.

The SFTPFragmentRef Element

use of SSH authentication requires that the SFTP protocol (or a jump host) is specified. This done by specifying a Profile element that calls a suitably configured SFTPFragment. This Profile will then be called when JADE is started. The SFTPFragment will contain at least the specification of a BasicConnection element and the SSHAuthentication element.

  • Profile
    • Operation
      • Copy
        • CopySource
          • CopySourceFragmentRef
            • Ref -> SFTPFragment (Ref=Name)
  • Fragments
    • ProtocolFragments
      • SFTPFragment (identified by Name Attribute)
        • BasicConnection
        • SSHAuthentication

SSH Authentication requires specification of:

  • an Account (i.e. a user name, required)
  • either an AuthenticationMethodPassword element, which in turn requires a Password to be specified
    OR an AuthenticationMethodPublickey element which requires that an AuthenticationFile and optional Passphrase are specified

More information about the specification of SSHAuthentication can be found in:

...

Further Information

...