The (S)FTP Client communication point can be configured dynamically using a single XML configuration templates file. A configuration templates file is a set of configuration parameters that override the statically defined configuration and are uniquely identified using an identifier attribute. When a message is sent ( Output mode) or used to trigger input ( Out->In mode) a single message property is set on the outgoing message that indicates which template should be used. This effectively allows a single (S)FTP Client communication point to be configured with multiple independent configurations, with one of these configurations subsequently selected at runtime.
Refer to Examples for examples of templates.
Configuration templates are provided by setting the Configuration Mode configuration property to Dynamic Using XML Configuration Templates
and then providing the XML configuration templates in the Configuration Templates property. Each configuration template can provide any number of configuration parameters which will override those settings configured in the static configuration. These configuration templates are then validated as part of the communication point configuration process.
Each configuration template is treated independently and merged with the static configuration settings. Settings configured in the template override those configured in the static configuration on the communication point.
As part of this merge operation, the configuration is validated to ensure that it can be used in the communication point. For example, if the template enables SFTP, then at least one SSH public key must have been configured in order to validate the SFTP server. This validation is performed on each template individually, as if the resolved values in that template were configured as the static configuration.
Refer to XML Elements for details on how each XML element in a configuration template is validated.
It is important to verify each configuration template is configured correctly to ensure that the expected configuration settings are being overridden or inherited from the static configuration. The (S)FTP Client communication point provides two ways to do this:
The resolved configuration for each configuration template is logged at the INFO level whenever the communication point is configured. This shows the merged configuration for each configuration template and so can be compared to the expected values.
An XSD file is provided that can validate the XML configuration templates to ensure that they are configured correctly.
The (S)FTP Client Communication Point can also be configured dynamically using message properties. Refer to Dynamic Configuration Using Message Properties for details on the differences between the two configuration modes.
XML Elements
This section describes the permissible XML elements used in the configuration templates. The attached XSD file can validate these XML templates to check that they are valid.
<ConfigurationTemplates>
The root element in the configuration templates XML document must be the <ConfigurationTemplates>
element. It has no attributes.
The following child elements are permitted:
Child Element Name
|
Description
|
---|---|
Template |
The <Template> element is used once for each individual template within this set of configuration templates <ConfigurationTemplates> . Each template is independent of the other templates. They are all (individually) merged with the static configuration in order to generate their final configuration, and each must have a unique identifier. The order in which the templates are defined in the XML is not relevant - they are referenced at runtime using their unique identifiers. |
<Template>
The <Template>
element is used once for each configuration template. In all cases a configuration template inherits its settings from the static configuration unless explicitly overridden within the template. This means that a configuration template only needs to specify settings that are different to the static configuration.
The following attributes can be set on the <Template>
element:
Attribute Name
|
Description
|
Default Value
|
---|---|---|
id |
The unique identifier for this template. This attribute is mandatory, must not be empty, and must be unique with respect to all other configuration templates configured on this communication point. Note that the id is not case-sensitive. This means that "ONE" and "one" are considered to be the same id, not unique. |
None |
The following child elements are permitted:
Configuration Property | Child Element Name | Values | Example |
---|---|---|---|
Protocol | ConnectionType |
Sets the type of connection protocol to use:
It defaults to the value configured in the static configuration if it is not set. A configuration error occurs if it is set to an empty value, or set to an invalid value. If the port is set to 0 then this controls the selected port (it uses the appropriate default port for the selected protocol). |
<ConnectionType> FTPSExplicit </ConnectionType> |
Server | ServerHostname |
Sets the hostname or IP address of the FTP / FTPS / SFTP server. It is mandatory to provide a hostname either in the template or in the static configuration. |
<ServerHostname> myFtpServer </ServerHostname> |
Port | ServerPort |
Sets the port number that the FTP / FTPS / SFTP server is listening on. If this is set to zero, then the default port for the selected protocol is used (in other words, 21 for FTP and FTPS explicit; 22 for SFTP; and 990 for FTPS implicit). The port number cannot be set to a negative value. |
<ServerPort> 1234 </ServerPort>
|
Read Timeout | ReadTimeout |
Sets the socket read timeout used when expecting a response from the FTP server. This is configured in milliseconds and must be at least 1000ms. |
<ReadTimeout> 25000 </ReadTimeout> |
Connection Mode | ConnectionMode |
Sets the connection mode to use for data channels when connecting to an FTP or FTPS server:
It defaults to the static configuration if not set, set to an empty value, or set to an invalid value. |
<ConnectionMode> passive </ConnectionMode> |
Transfer Mode | TransferMode |
Sets the data transfer mode to use when uploading and downloading files:
It defaults to the static configuration if not set, set to an empty value, or set to an invalid value. |
<TransferMode> ascii </TransferMode> |
Server Validation Mode | ServerValidationMode |
Determines how the SSL certificates or SSH public keys are found for an FTPS or SFTP connection. See the Server Validation Mode property description for details about each option.
If set to an empty string or an invalid value then it is ignored and the statically configured value is used instead. |
<ServerValidationMode> allowDynamicKeyLookup </ServerValidationMode> |
SSL Server Certificates | SslServerCertificate |
Used to indicate which SSL certificate should be used for server authentication when using FTPS. It can be provided any number of times in order to provide multiple SSL certificates, with each element containing the alias of a single SSL certificate. If FTPS (implicit or explicit) is being used, it is mandatory to provide at least one SSL certificate either in the static configuration or in the configuration template unless the Server Validation Mode does not require this. Empty aliases are just ignored, however, an error is raised if the specified alias cannot be found in the Rhapsody Certificate and Key Manager. |
<SslServerCertificate> filezilla </SslServerCertificate> |
Hostname Validation | SslHostnameValidation |
Determines whether or not SSL hostname validation is performed when connecting to an FTPS server. If enabled then the hostname used to connect to the FTPS server must match either the Subject's CommonName, or a DNS name in the SubjectAlternativeName extension in the SSL certificate presented by the server. This element is set to one of the following values:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. Note that hostname validation is never performed if the configured hostname is either |
<SslHostnameValidation> enabled <SslHostnameValidation> |
Cipher Suites | CipherSuites |
Sets the level of SSL cipher suites or SSH algorithms that should be enabled for this connection:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<CipherSuites> VERY_STRONG </CipherSuites> |
SSL Client Private Key | SslClientPrivateKey |
Sets the alias of the SSL private key used for SSL client authentication when connecting to an FTPS server. An error is raised if the specified private key cannot be found. If this element is not set then it defaults to the static configuration, however, if it is explicitly set to an empty string then it will clear any configured SSL private key in the static configuration. |
<SslClientPrivateKey> myKey </SslClientPrivateKey> |
SFTP Server Public Key | SshServerPublicKey |
Used to indicate which SSH public key should be used for server authentication when using SFTP. It can be provided any number of times in order to provide multiple SSH public keys, with each element containing the alias of a single SSH public key. If SFTP is being used, it is mandatory to provide at least one SSH public key either in the static configuration or in the configuration template unless the Server Validation Mode does not require this. Empty aliases are just ignored, however, an error is raised if the specified alias cannot be found in the Rhapsody Certificate and Key Manager. |
<SshServerPublicKey> linux-test-rsa </SshServerPublicKey> <SshServerPublicKey> linux-test-dsa </SshServerPublicKey> |
SFTP Client Authentication Mode | SshClientAuthMode |
Sets the type of SSH client authentication that will be performed:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<SshClientAuthMode> publickey </SshClientAuthMode> |
SFTP Client Private Key | SshClientPrivateKey |
Sets the alias of the SSH private key used for SSH public key authentication when connecting to an SFTP server. The SSH client authentication mode must include public key authentication. An error is raised if the specified alias cannot be found in the Rhapsody Certificate and Key Manager. |
<SshClientPrivateKey> myPrivateKey </SshClientPrivateKey> |
SFTP Compression | SshCompressionMode |
Used to configure which SSH compression modes are supported by the communication point when connecting to an SFTP server. This element can be included multiple times with each occurrence containing one of the following values:
Empty values are ignored but invalid values will cause an error to be raised. If no compression modes are selected, the static configuration will be used. If the static configuration has not been set, then the communication point automatically enables all the options by default. |
<SshCompressionMode> zlib </SshCompressionMode> <SshCompressionMode> zlib@ssh.com </SshCompressionMode> |
SFTP Advanced Configuration Flags | SshConfigFlag |
Used to configure the advanced SSH configuration flags which are primarily used to work around known bugs and quirks in various SFTP servers. It can be included multiple times with each occurrence containing one of the following values:
Empty values in this element are ignored, but unknown values cause an error to be raised. However, if a single empty |
<SshConfigFlag> disableWaitOnChannelClose </SshConfigFlag> <SshConfigFlag> disableChmodOnMkdir </SshConfigFlag> |
Server Line Endings | SshRemoteEol |
Sets which line endings expected on the server. This is only used when connected to an SFTP server and performing ASCII mode file transfer:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<SshRemoteEol> unix </SshRemoteEol> |
Username | Username |
Sets the username to use to login to the FTP server. |
<Username> someUser </Username> |
Password | Password |
Sets the password to use to login to the FTP server. Note that the password is not used if connecting to an SFTP server using SSH public key authentication. Passwords can be provided either in plaintext, encrypted using the Rhapsody>Encrypt Password function in Rhapsody IDE, or using Rhapsody Variables. |
<Password> somePassword </Password> |
Character Encoding | CharacterEncoding |
Sets the character encoding to use for the FTP control connection. It must be set to the name of a valid Java character encoding. |
<CharacterEncoding> UTF-8 </CharacterEncoding> |
Connection Establishment Mode | ConnectionEstablishmentMode |
Specifies whether to maintain a constant connection to the FTP server or to disconnect the connection immediately after it becomes idle. |
<ConnectionEstablishmentMode> maintainConnection </ConnectionEstablishmentMode> |
Active Mode IP Address | ActiveModeIpAddress |
Sets the IP address that the communication point will listen on for active mode FTP / FTPS connections. If set, it must be a valid IPv4 address. |
<ActiveModeIpAddress> 192.168.23.12 </ActiveModeIpAddress> |
Active Mode Port Range | ActiveModePortRange |
Sets the range of allowed ports that the communication point will listen on for active mode FTP / FTPS connections. If set it must be a valid port range in the format <start>-<end> . |
<ActiveModePortRange> 11000-11099 </ActiveModePortRange> |
FTP Options | FtpOption |
Sets a number of advanced FTP options that are primarily used for working around known bugs or quirks in various FTP and FTPS servers. This element can be included multiple times, and each element must contain one of the following values:
Empty values in this element are ignored, but unknown values cause an error to be raised. However, if a single empty |
<FtpOption> autoSubstituteIp </FtpOption> <FtpOption> enableCompression </FtpOption> |
FTPS Options | FtpsOption |
Sets a number of advanced FTPS options that are primarily used for working around known bugs or quirks in various FTPS servers. This element can be included multiple times, with each occurrence containing one of the following values:
Empty values in this element are ignored, but unknown values cause an error to be raised. However, if a single empty |
<FtpsOption> disableSessionResumption </FtpsOption> <FtpsOption> startWithClearChannels </FtpsOption> |
Proxy Server Type | ProxyServerType |
Selects which type of proxy server to use:
Note that you cannot use an HTTP proxy when using FTP(S) with Connection Mode set to active. |
<ProxyServerType> http </ProxyServerType> |
Proxy Server Address | ProxyServerAddress |
Sets the hostname or IP address of the proxy server. |
<ProxyServerAddress> myProxyServer </ProxyServerAddress> |
Proxy Server Port | ProxyServerPort |
Sets the port to connect to the proxy server on. It must be a valid port number (between 1 and 65535). |
<ProxyServerPort> 80 </ProxyServerPort> |
Proxy Server Public Address | ProxyServerPublicAddress |
Sets the public address of the proxy server. This is usually only needed when using FTP(S) with Active Connection Mode. |
<ProxyServerPublicAddress> 23.59.196.226 </ProxyServerPublicAddress> |
Proxy Server Username | ProxyServerUsername |
Sets the username to authenticate to the proxy server with. |
<ProxyServerUsername> proxyUser </ProxyServerUsername> |
Proxy Server Password | ProxyServerPassword |
Sets the password to authenticate to the proxy server with. This is not required for SOCKS4 as the SOCKS4 protocol does not support password authentication. Passwords can be provided either in plaintext, encrypted using the Rhapsody>Encrypt Password function in Rhapsody IDE, or using Rhapsody Variables. |
<ProxyServerPassword> proxyPass </ProxyServerPassword> |
Generate Message When No Response | GenerateResponseMessage |
Enables the 'generatemessagewhen no response' mode:
If an invalid value is detected, it uses the static value. |
<GenerateResponseMessage> enabled </GenerateResponseMessage> |
Input Directory | InputDirectory |
Sets the base input directory to use when downloading files. |
<InputDirectory> dir1/dir2 </InputDirectory> |
Input Pattern Type | InputPatternType |
Sets the type of the input pattern used for matching files for download:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<InputPatternType> regex </InputPatternType> |
Input Pattern | InputPattern |
Sets the input pattern used for matching files for download. It is mandatory to provide an input pattern either in the static configuration or in the configuration template. In addition, if the pattern type is a regular expression, this pattern must be a valid regular expression. The (S)FTP communication point supports Java Regex. |
<InputPattern> [A-Za-z0-9]+\.txt </InputPattern> |
Input Directory Navigation Mode | InputDirectoryNavigationMode |
Specifies whether to use FTP commands to access the target directory directly, or navigate to the target directory via the home directory:
|
<InputDirectoryNavigationMode> navigateViaHomeDirectory </InputDirectoryNavigationMode> |
Directory Traversal Mode | DirectoryTraversalMode |
Determines whether the communication point will just download files from the configured input directory or will instead traverse child directories in order to find matching files. It must be set to one of the following:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<DirectoryTraversalMode> recurse </DirectoryTraversalMode> |
Follow Symbolic Links | SymbolicLinkAction |
Determines how the communication point handles symbolic links when downloading files from the FTP server:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<SymbolicLinkAction> ignore </SymbolicLinkAction> |
Post Download Action | PostDownloadAction |
Determines what the communication point does with the remote files after they have been downloaded:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<PostDownloadAction> rename </PostDownloadAction> |
Rename To | RenameTo |
Sets the target filename for a rename after downloading a file. This is ignored if not renaming files after downloading them,but otherwise is required to be configured either in the static configuration or the configuration template. This may contain a number of variables described in the Rename To configuration property to reference the old filename or current date/time. If renaming files after downloading them is enabled, this must be set either in the XML template or in the static configuration. It must not be set to exactly %filename% . |
<RenameTo> ../done/%filename% </RenameTo> |
Input Locales | InputLocale |
Used to set which Java locales are used when parsing directory listings from the FTP or FTPS server. It can be provided multiple times with each occurrence containing the identifier of a Java locale. Empty values in this element are ignored, but unknown values cause an error to be raised. However, if a single empty InputLocale element is present (for example <InputLocale/> ) then it will clear any input locales set in the static configuration rather than inheriting them. |
<InputLocale>jp<InputLocale> <InputLocale>en_US</InputLocale> <InputLocale>en_NZ</InputLocale> <InputLocale>en</InputLocale> |
Directory Listing Parser | DirectoryListingParser |
Sets the directory listing parser type to use when parsing directory listings from the FTP or FTPS server:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<DirectoryListingParser> vms </DirectoryListingParser> |
JavaScript Directory Parser | JavaScriptDirectoryParser |
Sets the custom JavaScript directory parser to use to parse directory listings from the FTP or FTPS server. It is ignored if the directory listing parser type is not JavaScript,otherwise a JavaScript parser must be provided either in the static configuration or in the configuration template. An error is raised if this is not set when required or if the provided JavaScript fails to compile. Exercise caution when editing this script as it is provided within an XML element. The script needs to be correctly JavaScript-escaped. To avoid this the JavaScript directory parser can be declared within a CDATA section. |
<JavaScriptDirectoryParser> <![CDATA[ if (line.length > 49) { contents.add({ name: line.substring(49), isDirectory: line[0] == 'd' }); } ]]> </JavaScriptDirectoryParser> |
Before Receive Commands | BeforeReceiveCommand |
Used to configure custom commands sent to the FTP server prior to downloading a file. It can be set multiple times to configure multiple custom commands. Refer to Custom Commands for details. |
<BeforeReceiveCommand command='/usr/bin/myCommand %filename%' onError='blacklist'/> |
After Receive Commands | AfterReceiveCommand |
Used to configure custom commands sent to the FTP server after downloading a file. It can be set multiple times to configure multiple custom commands. Refer to Custom Commands for details. |
<AfterReceiveCommand command='rm %filename%' onError='ignore'/> |
Archive Message Bodies | ArchivingStrategy |
Indicates whether messages arriving on this communication point are to be archived as per standard archiving strategies:
|
<ArchivingStrategy> normal </ArchivingStrategy> |
Maximum File Size for Download | MaxDownloadFileSize |
Specifies the maximum size of a file in megabytes that can be downloaded. |
<MaxDownloadFileSize> 1 </MaxDownloadFileSize> |
Output Directory | OutputDirectory |
Sets the base output directory to use when uploading files. |
<OutputDirectory> uploads </OutputDirectory> |
Base Filename | BaseFilename |
Sets the base filename to use when generating the filename for uploaded files. Note that this can be overridden on a per message basis using the BaseFilename message property even when configuration templates are in use. |
<BaseFilename> file </BaseFilename> |
Filename Suffix | Suffix |
The filename suffix to use when generating the filename for uploaded files. Note that this can be overridden on a per message basis using the Suffix message property even when configuration templates are in use. |
<Suffix> txt </Suffix> |
Duplicate Filename Behaviour | DuplicateBehavior |
Determines how duplicate filenames are handled by the communication point:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. |
<DuplicateBehavior> rename </DuplicateBehavior> |
Append Date/Time | AppendDateFormatForOutputFile |
Determines if the current date/time is appended to the outgoing filename or not:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. This setting is ignored if the evaluated duplicate behavior mode is to append to an existing file. |
<AppendDateFormatForOutputFile> appendDateTime </AppendDateFormatForOutputFile> |
Append Date/Time Format | AppendDateTimeFormat |
Defines the date-time format when the date-time is appended to the filename. The default date-time format is yyyy-MM-dd-HH-mm-ss-SSS and is used if this property is left blank. The format should follow the specification in SimpleDateFormat in Java. |
<AppendDateTimeFormat> yyyy-MM-dd-HH-mm-ss-SSS </AppendDateTimeFormat> |
Use Temp Files | TemporaryFileUsage |
Determines if temporary files will be used during uploads. It can be set to one of the following:
It defaults to the static configuration if is not set, set to an empty value, or set to an invalid value. This setting is ignored if the evaluated duplicate behavior mode is to append to an existing file. |
<TemporaryFileUsage> useTempFiles </TemporaryFileUsage> |
Before Send Commands | BeforeSendCommand |
Used to configure custom commands sent to the FTP server prior to uploading a file. It can be set multiple times to configure multiple custom commands. Refer to Custom Commands for details. |
<BeforeSendCommand command='/usr/bin/myCommand %filename%' onError='connectionError'/> |
After Send Commands | AfterSendCommand |
Used to configure custom commands sent to the FTP server after uploading a file. It can be set multiple times to configure multiple custom commands. Refer to Custom Commands for details. |
<AfterSendCommand command='/usr/bin/myCommand %filename%' onError='errorQueue'/> |
Directory Navigation Mode | DirectoryNavigationMode |
Specifies whether to use FTP commands to traverse the target directory path and create the target directory if required during the file upload, or perform a direct file upload to the target directory:
|
<DirectoryNavigationMode> uploadWithoutNavigating </DirectoryNavigationMode> |
Custom Commands
The custom command elements (<BeforeReceiveCommand>
, <AfterReceiveCommand>
, <BeforeSendCommand>
, and <AfterSendCommand>
) are used to define custom commands that are sent to the FTP server. If no custom command elements are included for the relevant set of commands, they are inherited from the static configuration. However, it is possible to clear the inherited commands by adding a single custom command element with its 'command' attribute not set or set to an empty string.
The following attributes can be set:
Attribute Name
|
Description
|
---|---|
command |
The command to execute. This is arbitrarily defined by the user but it can use %filename% and %directory% to represent the filename and directory respectively. The custom command element is ignored if this attribute is not set or is empty. |
onError |
Determines the action to take if an error is detected while executing the custom command:
The Error Queue option is only available for the custom send commands, and the blacklist option is only available for the custom receive commands.
|
Rhapsody Variables
It is possible to use Rhapsody variables within configuration templates to allow any of the settings to be retrieved from a Rhapsody variable rather than defined within the template itself. This is done by referencing the Rhapsody variable as $(variableName)
from within the appropriate configuration template. In addition, it is possible to use multiple variables or a mixture of variables and literals in order to provide a configuration setting. For example:
<ConfigurationTemplates> <Template id="one"> <InputDirectory>$(baseDirectory)/subDir</InputDirectory> </Template> </ConfigurationTemplates>
However, it is important to note that the Rhapsody variables are evaluated on each configuration setting individually after the XML document has been parsed. This means that it is not possible to include XML extracts within Rhapsody variables in order to set multiple configuration settings simultaneously by including an XML fragment.
Message Properties
The following message properties can be set while configuration templates are in use. Other message properties are ignored by the communication point.
Property Name
|
Description
|
---|---|
TemplateId |
The identifier of the configuration template that should be used. This message property is mandatory when configuration templates are enabled and must correspond to one of the configured templates. The id is not case-sensitive. This means for example, if there was a template with id "one", that a value of "ONE" or "one" could be used to reference that template. |
BaseFilename |
The base filename to use for uploaded files. This will override any value configured in the configuration template or in the static configuration. It only applies to Output mode. |
Suffix |
The filename suffix to use for uploaded files. This will override any value configured in the configuration template or in the static configuration. It only applies to Output mode. |
Examples
Simple
The following XML excerpt is an example of a simple configuration template:
<?xml version="1.0"?> <ConfigurationTemplates> <Template id="one"> <ConnectionType>SFTP</ConnectionType> <ServerHostname>$(server1)</ServerHostname> <ServerPort>22</ServerPort> <SshServerPublicKey>sshPubKey1</SshServerPublicKey> <SshClientAuthMode>password</SshClientAuthMode> <SshCompressionMode>zlib@ssh.com</SshCompressionMode> <SshConfigFlag>disableWaitOnChannelClose</SshConfigFlag> <SshConfigFlag>disableChmodOnMkdir</SshConfigFlag> <SshRemoteEol>unix</SshRemoteEol> </Template> <Template id="two"> <ConnectionType>SFTP</ConnectionType> <ServerHostname>$(server2)</ServerHostname> <SshServerPublicKey>sshPubKey2</SshServerPublicKey> <SshClientAuthMode>publickey</SshClientAuthMode> <SshClientPrivateKey>sshPrvKey1</SshClientPrivateKey> </Template> </ConfigurationTemplates>
This example defines two templates with the identifiers one
and two
. Each template is required to have a unique identifier. A template is then selected by an outgoing message by setting a message property called TemplateId
to the template identifier. If the selected template cannot be found, or if no template is specified for a message, then the outgoing message will be sent to the error queue.
Complex
The following XML excerpt is an example of a more complex configuration template:
<ConfigurationTemplates> <Template id="server1"> <ConnectionType>FTP</ConnectionType> <ServerHostname>server1</ServerHostname> <ServerPort>12003</ServerPort> <Username>server1User</Username> <Password>$(server1Password)</Password> <TransferMode>ascii</TransferMode> <OutputDirectory/> <DuplicateBehavior>appendToFile</DuplicateBehavior> </Template> <Template id="server2"> <ConnectionType>FTPSImplicit</ConnectionType> <ServerHostname>server2</ServerHostname> <Username>bob</Username> <Password>secret</Password> <SslServerCertificate>server2ssl</SslServerCertificate> <CipherSuites>VERY_STRONG</CipherSuites> <AppendDateTime>appendDateTime</AppendDateTime> </Template> <Template id="server3"> <ConnectionType>FTPSExplicit</ConnectionType> <ServerHostname>server3</ServerHostname> <Username>fred</Username> <SslServerCertificate>server3ssl</SslServerCertificate> <SslClientPrivateKey>fred@server3</SslClientPrivateKey> <FtpOption>enableCompression</FtpOption> <ConnectionMode>passive</ConnectionMode> <TemporaryFileUsage>useTempFiles</TemporaryFileUsage> </Template> <Template id="server4"> <ConnectionType>SFTP</ConnectionType> <ServerHostname>server4</ServerHostname> <Username>george</Username> <SshServerPublicKey>server4-rsa</SshServerPublicKey> <SshServerPublicKey>server4-dsa</SshServerPublicKey> <SshClientAuthMode>publickey</SshClientAuthMode> <SshClientPrivateKey>george@server4</SshClientPrivateKey> <SshCompressionMode>zlib@ssh.com</SshCompressionMode> <SshConfigFlag>disableWaitOnChannelClose</SshConfigFlag> <SshConfigFlag>disableChmodOnMkdir</SshConfigFlag> </Template> </ConfigurationTemplates>