FTP Log On Action

Declaration

<AMFTPLOGIN SERVER="text" USERNAME="text" PASSWORD="text" PORT="number" LOGFILE="text" PASSIVEMODE="yes/no" PROXYTYPE="text [options]" PROXYSERVER="text" PROXYPORT="text" PROXYUSERNAME="text" PROXYPASSWORD="text" SESSION="text">

See Also

FTP Log On Action-Setting Properties, FTP Log On, FTP Download, FTP Upload, FTP Delete, FTP Rename, FTP Create Folder, FTP Remove Folder, FTP Change Folder, FTP Log Off, HTTP Download, HTTP Post

Description

Starts a transaction with a File Transfer Protocol (FTP) server and creates a session for the current connection. Other FTP related actions can follow this step. This action allows simultaneous FTP connections using the same username/password and

NOTE: Be sure to end FTP sessions with an "FTP Log Off" step.

Practical Usage

Used to establish a connection with an FTP  server. Other actions such as 'FTP Download' or 'FTP Upload' can then be used in subsequent steps.

Parameters

General Tab

Host

Text, Required
MARKUP: SERVER="ftp.networkautomation.com"

Specifies the FTP server to connect to. This can be an IP address (e.g. xxx.xxx.xxx.xxx) or a server and domain name (e.g. server.domain.com).

User Name

Text, Required
MARKUP: USERNAME="Anonymous"

Specifies the username that should be used when logging on to the FTP Server. The Username should be preconfigured at the server level.

Password

Text, Required
MARKUP: PASSWORD="password here"

Specifies the password that should be used when logging on to the FTP Server. The Username should be preconfigured at the server level. When the step is created using the Task Builder it is written to the task encrypted.

Use anonymous log on

Yes/No, Optional - Default NO
MARKUP: ANONYMOUSLOGIN="YES"

Specifies that the FTP server should be logged onto as an "Anonymous" user. The server must be configured to accept Anonymous connections. If set to YES, the User name/Password parameters are ignored.

Session Name

Text, Optional - Default "Default"
MARKUP: SESSION="YES"

Specifies the session name to identify this login request in subsequent FTP steps. This allows several connections to be active simultaneously.

Use compatibility mode

Yes/No, Optional - Default NO
MARKUP: COMPATIBILITY="YES"

If enabled, functionality reverts to AutoMate's legacy FTP engine (used in AutoMate 6 and older versions). This option is available mainly for AutoMate 6 or older users.

NOTE: Certificate stores are not available in compatibility mode.

 

Advanced Tab

Server Connection Type

Options, optional default ftp
MARKUP: "ftps_implicit"

Specifies the type of FTP connection that should be used. If unsure which connection to use, check with the administrator of the FTP Server.

The available options are:

Port

Number, Optional - Default 21
MARKUP: PORT="1000"

Specifies the port that should be used to connect to the FTP server. Most standard FTP servers operate on port 21 (the default port specified) however, this parameter can be customized in case the FTP server operates on other ports.

NOTE: Other default ports may be assigned depending on the server connection type selected.

FTP log file location

Text, Optional - Default (none)
MARKUP: LOGFILE="c:\errorlog.log"

Specifies the location of the detailed FTP log file. This log file contains the exact text of the FTP session which can be useful in diagnosing particular errors or elusive problems.

Overwrite Existing Log File

Yes/No, Optional - Default YES
MARKUP: OVERWRITELOG="NO"

If enabled, specifies that the log file should be overwritten if the same file already exists.

Connection timeout

Text, Optional - Default - 60 seconds
MARKUP: TIMEOUT="60"

Specifies a connection timeout to customize how long AutoMate will wait before aborting a connection attempt. If connection is not established within the timeout value specified, it is automatically aborted. (Default = 60 seconds).

Passive mode (for firewalls)

Yes/No, Optional - Default NO
MARKUP: PASSIVEMODE="YES"

Determines how an FTP data connection is made. If this option is enabled, AutoMate issues the PASV command and the server tells AutoMate where to establish the data connection. AutoMate initiates both connections to the server, solving the problem of firewalls filtering the incoming data port connection to the client from the server. If this option is disabled, the PORT method is used. AutoMate listens for a data connection which is established by the server and the PORT command tells the server where to connect to. AutoMate then connects to the server where the server indicated. This method is sometimes used with some proxy configurations. However, some proxy configurations require PORT transfers and some FTP servers do not support PASV transfers. The Passive Mode option is available only if the FTP (Standard FTP), FTP with SSL (Implicit) or FTP with SSL (Explicit) option is selected from the Server Connection Type parameter.

Encrypt data channel

Yes/No, Optional - Default NO
MARKUP: ENCRYPTDATACHANNEL="YES"

If enabled, specifies that all data channel communication between the FTPS client and server are to be encrypted. It may NOT be advantageous to use data channel encryption when performing transfers under the following scenarios:

The Encrypt data channel option is available only if the FTP with SSL (Implicit) or FTP with SSL (Explicit) option is selected from the Server Connection Type parameter.

Ignore invalid server certificates

Yes/No, Optional - Default NO
MARKUP: IGNOREINVALIDCERTIFICATE="YES"

If enabled, specifies that this action will ignore invalid certificates when connecting to an FTP server using SSL. This option is available only if the FTP with SSL (Implicit) or FTP with SSL (Explicit) option is selected from the Server Connection Type parameter.

Enable Tumbleweed compatibility mode

Yes/No, Optional - Default NO
MARKUP: TUMBLEWEEDSERVER="YES"

If enabled, allows compatibility with Tumbleweed Secure Content Delivery

 

Certificates Tab

FTP over SSL allows sessions to be encrypted between an FTP client and server. The Certificates tab is used to enter certificate information when an FTP over SSL connection is chosen. A certificate is a digitally-signed statement that binds the value of a public key to the identity of the person, device, or service that holds the corresponding private key. One of the main benefits of certificates is that hosts no longer have to maintain a set of passwords for individual subjects who need to be authenticated as a prerequisite to access. Instead, the host merely establishes trust in a certificate issuer.

From certificate store

When enabled, allows selection of a certificate using the Window's trusted certificate store for certificate approval. Clicking the Choose Certificate button opens the Windows Certificates snap-in, the primary tool for users and administrators to view and manage certificates for a user, computer, or service. The Certificates snap-in allows the user to request, renew, find, view, move, copy, and delete certificates.

NOTE: This option is available only if the FTP with SSL (Implicit) or FTP with SSL (Explicit) option is selected from the Server Connection Type parameter located in the Advanced tab.

Certificate Issuer

Text, Optional - Default (none)
MARKUP: CERTIFICATEISSUERID="Name"

Specifies information regarding the certification authority that issued the certificate (available only when From certificate store option is selected).

Certificate Serial Number

Text, Optional - Default (none)
MARKUP: CERTIFICATESERIAL="c7 f5 fa f8 6d ab 77 87 43 4a 11 43 f1 cd 3c 0f"

Specifies the unique serial number that the issuing certification authority assigns to the certificate. The serial number is unique for all certificates issued by a given certification authority (available only when From certificate store option is selected).

From Certificate File(s)

When enabled, allows selection of a certificate file.

Certificate file

Text, Optional - Default (none)
MARKUP: CERTIFICATE="C:\Temp\Certificate_Location"

Specifies the path and filename of the certificate file.

Certificate private key

Text, Optional - Default (none)
MARKUP: CERTIFICATEPRIVATEKEY="C:\Temp\Private_Key"

Specifies the path and filename of the Private key file. This option is available only when the SFTP (Public Key File) option is selected from the Server Connection Type parameter located in the Advanced tab.

In public/private key encryption, different keys are used to encrypt and decrypt information. The first key is a private key (a key that is known only to its owner), while the second key (called the public key) can be made known and available to other entities on the network.

The two keys are different but complementary in function. For example, a user’s public key can be published in a certificate in a directory so that it is accessible to other people in the organization. The sender of a message can retrieve the user’s certificate from Active Directory, obtain the public key from the certificate, and then encrypt the message by using the recipient's public key. Information that is encrypted with the public key can be decrypted only by using the corresponding private key of the set, which remains with its owner, the recipient of the message.

Passphrase

Text, Optional - Default (none)
MARKUP: PASSPHRASE="passphrase"

Specifies the passphrase used to authenticate connection. A passphrase is a password that comprises a whole phrase.

Proxy Tab

Proxy Type

Text, Optional - Default (none)
MARKUP: PROXYTYPE="Socks5"

Specifies proxy protocol that should be used.  If you are unsure of the value to use in this parameter, contact your network administrator.

The available options are:

Note:  To create the most portable tasks it is best to specify "system default" and specify proxy settings in the Preferences of the Task Administrator (Proxy Tab).  By proceeding this way, tasks created in one environment that may have a proxy server will be portable to others that do not - and vice-versa.

Proxy Port

Number, Optional - Default 1028
MARKUP: PROXYPORT="3000"

Specifies the port that should be used to connect to the proxy server. Most proxy servers operate on port 1028 (the default) however the proxy server can be customized to operate on other ports

Proxy Host

Text, Optional - Default (blank)
MARKUP: PROXYSERVER="proxy.host.com"

Specifies the hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

User Name (Proxy)

Text, Optional - Default (none)
MARKUP: PROXYUSERNAME="username"

Specifies the username that should be used to authenticate when connecting through the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Password (Proxy)

Text, Optional - Default (none)
MARKUP: PROXYPASSWORD="encrypted"

Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMFTPLOGIN SERVER="ftp.networkautomation.com" ANONYMOUSLOGIN="YES" LOGFILE="C:\errorlog.log" OVERWRITELOG="NO" />