Starting and stopping a client session

 

After you obtain a logon ID and password to a remote File Transfer Protocol (FTP) server, you can start a client session with that FTP server. You can end the client session using the QUIT FTP subcommand.

This topic provides details for using the FTP client on the i5/OS® operating system.

 

Starting an FTP client session

Before starting the FTP client function, have the following information:

The Start TCP/IP File Transfer Protocol (STRTCPFTP remotesystem) command starts a client session on the local system, and then opens a connection to the FTP server on the specified remote system. For example, entering the command FTP myserver.com starts a client session on the local system, and then opens a connection to the FTP server on the remote myserver.com system. You can specify additional parameters, or wait to be prompted for the parameters by typing STRTCPFTP without specifying a remote system.

                        Start TCP/IP File Transfer (FTP)           
                        
 Type choices, press Enter.                                              
            
 Remote system  . . . . . . . . . > MYSERVER.COM                         
            
            
            
 Coded character set identifier     *DFT          1-65533, *DFT    
 Port . . . . . . . . . . . . . . > *SECURE       1-65535, *DFT, *SECURE        
 Secure connection  . . . . . . .   *DFT          *DFT, *NONE, *SSL, *IMPLICIT  
 Data protection  . . . . . . . .   *DFT          *DFT, *CLEAR, *PRIVATE        
 

After you specify a remote system name, you are prompted to specify additional information. The following content summarizes the options available, and additional details that are available in the field help:

 

Remote system (RMTSYS)

Specifies the remote system name to which or from which the files are transferred. The following items are possible values:

*INTNETADR

The Internet address (INTNETADR) parameter is prompted. The Internet address is specified in the form, nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255

remote-system

Specify the remote system name to which or from which the file transfer takes place.

 

Coded character set identifier (CCSID)

Specifies the ASCII coded character set identifier (CCSID) that is used for single-byte character set (SBCS) ASCII file transfers when the FTP TYPE mode is set to ASCII. The possible values are:

*DFT

The CCSID value 00819 (ISO 8859-1 8-bit ASCII) is used.

CCSID-value

The requested CCSID value is used. This value is validated to ensure a valid ASCII SBCS CCSID was requested.

 

Port (PORT)

Specifies the port number used for connecting to the FTP server. Normally, the common port value of 21 is used to connect to the FTP server. Under some circumstances, the FTP server can be contacted at a port other than port 21. In those situations, the port parameter can be used to specify the server port to connect to. The possible values are:

*DFT

The value 00021 is used.

*SECURE

The value 00990 is used. Port 990 is reserved for secure FTP servers which immediately use Transport Layer Security (TLS) or Secure Sockets Layer (SSL) protocols to encrypt data.

port_value

The requested port value is used. This value is validated to ensure it is in the proper range.

If 990 is specified, the FTP client will perform the same functions as if *SECURE were specified.

 

Secure connection (SECCNN)

Specifies the type of security mechanism to be used for protecting information transferred on the FTP control connection (which includes the password used to authenticate the session with the FTP server). Transport Layer Security (TLS) and Secure Sockets Layer (SSL) are compatible protocols which use encryption to protect data from being viewed during transmission and verify that data loss or corruption does not occur.

The FTP client subcommand SECOPEN can be used to open a protected FTP connection during an FTP client session.

The possible values are:

*DFT

If the PORT parameter specifies *SECURE or 990, *IMPLICIT is used; otherwise, *NONE is used.

*IMPLICIT

The FTP client immediately attempts to use TLS or SSL when connecting to the specified FTP server (without sending an AUTH subcommand to the server). If the FTP server does not use implicit TLS or SSL on the specified port, or the TLS or SSL negotiation fails for any reason, the connection is closed.

*SSL

After connecting to the specified FTP server, the FTP client sends an AUTH (authorization) subcommand requesting a TLS-protected or an SSL-protected session. If the FTP server supports TLS or SSL, a TLS or SSL negotiation is performed. If the FTP server does not support TLS or SSL, or the TLS or SSL negotiation fails, the connection is closed.

*NONE

The FTP client does not use encryption for the control connection to the specified FTP server.

 

Data protection (DTAPROT)

Specifies the type of data protection to be used for information transferred on the FTP data connection. This connection is used to transfer file data and directory listings. The FTP protocol does not allow protection of the data connection if the control connection is not protected.

The FTP client subcommand SECData can be used subsequently to change the data protection level. The FTP client uses the FTP server subcommand PROT to request the specified data protection after a secure control connection has been established.

The possible values are:

*DFT

If the SECCNN parameter specifies a protected control connection, *PRIVATE is used; otherwise, *CLEAR is used.

*PRIVATE

Information sent on the FTP data connection is encrypted. If the SECCNN parameter specifies that the FTP control connection is not encrypted, *PRIVATE cannot be specified.

*CLEAR

Information sent on the FTP data connection is not encrypted.

 

Outgoing ASCII/EBCDIC table (TBLFTPOUT)

Specifies the table object that is to be used to map all outgoing data in the FTP client. Outgoing data is mapped from EBCDIC to ASCII. If no table object is specified for TBLFTPOUT, the CCSID parameter is used to determine outgoing mapping. The possible values are:

*CCSID

The CCSID parameter is used to determine outgoing mapping.

*DFT

The CCSID parameter is used to determine outgoing mapping.

The name of the outgoing mapping table can be qualified by one of the following library values:

*LIBL

All libraries in the user and system portions of the job's library list are searched until the first match is found.

*CURLIB

The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name

Specify the name of the library to be searched.

outgoing-mapping-table

Specify the table object to be used by the FTP client for mapping outgoing data.

 

Incoming ASCII/EBCDIC table (TBLFTPIN)

Specifies the table object that is to be used to map all incoming data in the FTP client. Incoming data is mapped from ASCII to EBCDIC. If no table object is specified for TBLFTPIN, the CCSID parameter is used to determine incoming mapping. The following items are possible values:

*CCSID

The CCSID parameter is used to determine incoming mapping.

*DFT

The CCSID parameter is used to determine incoming mapping.

The name of the incoming mapping table can be qualified by one of the following library values:

*LIBL

All libraries in the user and system portions of the job's library list are searched until the first match is found.

*CURLIB

The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name

Specify the name of the library to be searched.

incoming-mapping-table

Specify the table object to be used by the FTP client for mapping incoming data.

 

Stopping the FTP client session

Use the QUIT subcommand to stop an FTP session.

The QUIT subcommand closes the connection with the remote host and ends the FTP session on the system. Alternatively, you can press F3 (Exit), and then confirm to end the FTP client session.

 

Parent topic:

Using the File Transfer Protocol client on the System i platform

Related concepts
Securing FTP clients with Transport Layer Security or Secure Sockets Layer