2.3.2 FTP Configuration
The FTP Configuration may be used to set details of how you wish to send and retrieve files using file transfer protocols. Activities to make use of these configurations are provided. These include:
- FTP_INBOUND
- FTP_OUTBOUND
- FTP_COMANDLIST
Information for an FTP Configuration is in three sections:
- Identification – identifies the FTP Configuration and contains basic information.
- Connection – information about the remote FTP Host and how to connect to that host.
- Details – specific details relating to the type of FTP Configuration being set up.
This identifies the FTP Configuration and contains basic information.
ID |
An identifier to uniquely identify this configuration |
Description |
This should describe the configuration. |
FTP type |
Inbound, Outbound or Command List. |
Status |
Active or Inactive. Configurations cannot be used in a processing sequence while they are in inactive status – supplied activities will end in error if they attempt to use a configuration that has inactive status. |
Following is information about the remote FTP Host and how to connect to that host.
Remote host |
You must specify the name of the remote FTP server. It may be specified as an IP address (nnn.nnn.nnn.nnn:port) or domain name. The default value for the port is 21 or 22 (if SFTP is selected) or 990 (for an FTPS connection using implicit TLS/SSL). |
Remote user |
Must be specified and contains the user profile to connect to the remote host. |
Remote password |
The password that is used along with the remote user to connect to the remote host. This value is held encrypted. |
Connection timeout |
This field can specify a timeout for the remote host connection to be established, in milliseconds. For example, specify 5000 for a timeout value of five seconds. If zero (or a negative value) is specified, then no connection timeout applies. |
Response timeout |
This field can specify a timeout for the response (socket read) wait, in milliseconds. For example, specify 5000 for a timeout value of five seconds. If zero (or a negative value) is specified, then no response timeout applies. If communications with the remote host are unreliable, you should specify a timeout value here to prevent the FTP operation apparently "hanging" if the communications link is broken in the middle of an operation. |
Use protocol and security |
There are a number of protocols and security layers associated with what is collectively known as 'FTP'. This field allows you to specify the particular protocol and security layer that you wish to use. You may choose from the options that are further described below: |
Standard FTP, when used alone, does not take any precautions to protect information transmitted during a session. This includes your username, password, and any files transmitted. In FTP all data is passed back and forth between the client and server without the use of encryption. This makes it possible for an eavesdropper to listen in and retrieve your confidential information including login details. This option may be most suitable when used over a controlled and secure private network and/or where the data being exchanged is not sensitive. It usually runs over TCP port 21.
FTPS: FTP over TLS/SSL (implicit)
FTPS: FTP over TLS/SSL (explicit)
FTPS extends the File Transfer Protocol (FTP) using TLS/SSL to encrypt the control session and, if required, the data session. TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are protocols that provide data encryption and authentication between applications in scenarios where that data is being sent across an insecure network.
In explicit mode, the connection is initially made using a plain socket in unsecured mode then the client and the server negotiates a change to a TLS/SSL connection using the AUTH subcommand. Implicit mode requires a secure control channel directly to the TLS/SSL FTP server using a port (usually 990) allocated specifically for such secure connections.
SFTP: SSH file transfer protocolSFTP (SSH file transfer protocol) is a secure replacement for FTP that runs over a Secure Shell (SSH) session, usually on TCP port 22. SFTP is a binary protocol that encrypts both commands and data before sending over the one connection (separate command and data channels are not used). SFTP is becoming more popular, not least because it's supported by Linux and UNIX servers by default.
When you choose the SFTP (SSH file transfer protocol), the following.additional fields are presented:
Private key file |
SFTP (SSH file transfer protocol) can use either user/password authentication or user and public key authentication. To use the latter, you usually will have to generate (or be provided with) two key files – a private key file (*.pem) and a public key file (*.pub). They should both be installed in the server file system in the SAME folder. You may also need to supply the public key file to your trading partner. The full path to the private key file should be entered in this field. You can click the prompt button to browse for a file on the LANSA Composer server. The FTP activities will expect to find a public key file with the same name and a ".pub" extension in the same folder. When using this mode of authentication the field is not used and will be ignored. |
Private key password |
If the private key file is encrypted, the password or passphrase to open the file should be entered in this field. This password is only used locally for this purpose – it is not sent to the remote server. |
Use SSH compression |
This field specifies whether or not the connection to the SFTP server uses SSH compression. |
When you choose the FTP or FTPS options, the following.additional fields are presented:
Secure data channel |
When using FTPS, the control channel is always secure, but a secure data channel is not enabled by default. If the data being transmitted has already been encrypted then providing a further layer of encryption over the data channel simply imposes additional overhead. However, if the data being transferred has not already been encrypted, then you may select in this field to specify that a secure data channel should be requested. |
Data link mode |
May be Passive or Active. |
Binary mode |
Indicates if the FTP transfer should be done in binary mode. This field does not apply and is not shown for a type FTP configuration. |
Note: The Test button can be used to check that the connection parameters are correct before saving. All parameters here are tested except
and .
The details section will vary according to the FTP type specified in the Identification section.
The Inbound FTP Configuration is for use in an Activity which connects to the remote host and uses the FTP GET command to retrieve files from that remote host and place the files on the local machine.
Local directory path |
This value must be specified and must contain the directory on the local machine where files which are retrieved from the remote host are placed. You can click the prompt button to browse for a folder location on the LANSA Composer server. |
Remote directory path |
The directory on the remote host from which files are retrieved. If not specified, files are retrieved from the user's default director |
Remote file list format |
The format of the file list which is retrieved from the remote host. Select from the dropdown list: Auto detect format (default), IBM i, Windows, Linux or NAME (use the FTP NLST subcommand). |
GET selection |
Select from the dropdown list: |
GET like pattern |
This will be available if the GET files like is selected for the . It must contain a pattern to identify the files to be retrieved from the remote host. For example: *.ord will retrieve files with an extension of ord. ord* will retrieve files which start with ord. |
GET files using |
This option affects the local file name and extension that will be used for files received from the remote FTP server. You may wish to alter this option when, for example, the remote FTP server uses file names and/or extensions that do not comply with local file system naming rules. |
After GET action |
Select from |
The outbound FTP Configuration is for use in an Activity which connects to the remote host and uses the FTP PUT command to place files from the local machine into a specific location on the remote host.
Local directory path |
This value must contain the directory on the local machine which contains files which are to be placed onto the remote host. You can click the prompt button to browse for a folder location on the LANSA Composer server. |
Remote directory path |
The directory on the remote host where files will be placed. If this is blank, files will be placed in the user's default directory. |
PUT selection |
Select from the dropdown list: |
Extension |
This will be available if the "Files with extension of " is specified for the PUT selection. This should contain the extension of the files to be selected. The value is case insensitive and no "." is required. |
Local archive path (OK) |
This value is optional. It can contain a directory path on your machine. Outbound files which are successfully transported will be moved to this directory. You can click the prompt button to browse for a folder location on the LANSA Composer server. |
Local archive path (ER) |
This value is optional. It can contain a directory path on your machine. Outbound files which are encounter errors during the FTP processing will be moved to this directory. You can click the prompt button to browse for a folder location on the LANSA Composer server. |
The command list FTP Configuration is for use in an Activity which connects to the remote host and executes the FTP commands which are specified in a file.
Command list file |
This must be specified and contains the full path and name of a file which contains FTP commands. The standard Activity executes the FTP commands using LANSA Integrator. For further information on the FTP commands and the keywords, refer to FTP commands. The command list file should contain only one command per line. Comment lines should contain a # as the first character. The line terminator may be carriage return, line feed, new line, carriage return line feed or line feed carriage return. |