SFTP
SFTP or Secure File Transfer Protocol is a secure version of the FTP (File Transfer Protocol), which processes the data access and data transfer over a Secure Shell (SSH) data stream.
-
You must create separate accounts for the SFTP connector in workflows and flow services. Additionally, the names of the SFTP V1 account and SFTP V2 account must be unique.
-
If the Hub and Spoke plan is enabled for your tenant, you can establish a connection from your private VPC using a private link for this connector.
Workflow Actions
-
Upload File: Uploads a specific file on the SFTP server.
-
Download File: Downloads a specific file from SFTP server.
-
Append File: Appends a specific local file to an existing file on the SFTP server.
-
Remove Directory: Deletes the specified directory from the SFTP server.
-
Create Directory: Creates a new directory at a specified location on the SFTP server.
-
Get List of Files and Folders: Retrieves list of files and folders from a specified directory on SFTP server.
-
Delete File: Deletes a specific file from SFTP server.
-
Create Symbolic Link: Creates a symbolic link of a specific file.
-
Rename File or Folder: Renames a specific file or folder from the FTP server.
-
Change Ownership: Changes ownership of a specific file or folder.
-
Change File or Folder Permission: Changes permission of a specific file or folder.
-
Change Group Ownership: Changes group permissions of a specific file or folder.
Common Questions
How to create an account for the SFTP connector?
To add an account for SFTP in IBM® webMethods Integration:
-
Drag any SFTP action onto the canvas and double-click on the action.
-
Click on the "+" button given beside the Connect to SFTP Server field. The Add Account window appears with the following account configuration fields:
-
Account Name: The unique name for the SFTP account. This is a required field.
-
Host: The host/IP address of the SFTP server.
-
Port: The port number you want to connect with.
-
Create Connection Using: The login type you want to use to establish a connection.
If you select Login Credential as the login type, the following fields will appear:
-
Username: Specify the username of your SFTP server.
-
Password: Enter the password associated with the specified SFTP server username.
-
Algorithm Keys: Specify the keys to explicitly override the default transport layer algorithm keys used for the connection.
-
Server Host Keys: Specify the host keys to explicitly override the default transport layer server host keys used for the connection.
-
Ciphers: Specify the ciphers to explicitly override the default transport layer ciphers used for the connection.
-
Hmacs: Specify the (H)MAC algorithms to explicitly override the default transport layer (H)MAC used for the connection.
-
Compress: Specify the compression algorithms to explicitly override the default transport layer compress used for the connection.
-
Ready Timeout: Specify the amount of time (in milliseconds) to establish a secure SSH connection. The default is 20000 milliseconds (20 seconds).
-
Retries: Specify the maximum number of times to retry to establish a secure SSH connection. The default value for this field is 2.
-
Retry Factor: Specify the time factor to calculate time between retries. The default value for this field is 2.
-
Retry Minimum Timeout: Specify the amount of time (in milliseconds) you want the server to wait between retry attempts. The default value for this field is 2000 (2 seconds).
-
Keep Alive Interval: Specify how often (in milliseconds) to send SSH-level keepalive packets to the server. If you want to disable this option and keep the session alive indefinitely, specify ‘0’ in this field. The default value for this field is 0. For example, if you set the value as 3000 for this field, it means that the server will receive keep-alive packets every 3 seconds.
-
Keep Alive Count Max: Specify how many consecutive, unanswered SSH-level keepalive packets that can be sent to the server before terminating the connection session. The default value for this field is 3. However, this field can only be used in conjunction with the Keep Alive Interval field. For example, if Keep Alive Interval is set to 2000 (2 seconds) and Keep Alive Count Max is set to 3, it means every 2 seconds for a maximum of 3 times, the server will receive keep-alive packets to keep the connection alive. If the packets are unanswered thrice consecutively, the connection session will be broken.
If you select SSH Key as the login type, the following fields will appear:
-
Username: Specify the username of your SFTP server.
-
SSH Key: Provide the path for the SSH Key associated with the specified username.
-
Passphrase: Provide the passphrase for the SSH Key associated with the specified username.
-
Algorithm Keys: Specify the keys to explicitly override the default transport layer algorithm keys used for the connection.
-
Server Host Keys: Specify the host keys to explicitly override the default transport layer server host keys used for the connection.
-
Ciphers: Specify the ciphers to explicitly override the default transport layer ciphers used for the connection.
-
Hmacs: Specify the (H)MAC algorithms to explicitly override the default transport layer (H)MAC used for the connection.
-
Compress: Specify the compression algorithms to explicitly override the default transport layer compress used for the connection.
-
Ready Timeout: Specify the amount of time (in milliseconds) to establish a secure SSH connection. The default is 20000 milliseconds (20 seconds).
-
Retries: Specify the maximum number of times to retry to establish a secure SSH connection. The default value for this field is 2.
-
Retry Factor: Specify the time factor to calculate time between retries. The default value for this field is 2.
-
Retry Minimum Timeout: Specify the amount of time (in milliseconds) you want the server to wait between retry attempts. The default value for this field is 2000 (2 seconds).
-
Keep Alive Interval: Specify how often (in milliseconds) to send SSH-level keepalive packets to the SSH server. If you want to disable this option and keep the session alive indefinitely, specify ‘0’ in this field. The default value for this field is 0. For example, if you set the value as 3000 for this field, it means that the server will receive keep-alive packets every 3 seconds.
-
Keep Alive Count Max: Specify how many consecutive, unanswered SSH-level keepalive packets that can be sent to the server before disconnection. The default value for this field is 3. However, this field can only be used in conjunction with the Keep Alive Interval field. For example, if the Keep Alive Interval field is set to 2000 (2 seconds) and the Keep Alive Count Max field is set to 3, it means every 2 seconds for a maximum of 3 times, the server will receive keep-alive packets to keep the connection alive. If the packets are unanswered three times consecutively, the connection will be broken automatically.
-
-
Once you have entered the required details, click Save. This will create the account for the SFTP connector.
Why is the Flow service execution failing with error for SFTP account: Host Key has been changed?
If the host key is changed after the SFTP account creation, manually update the account to get the latest host key in order to avoid the transaction failures.
What are the different download methods available under the Download File (v6) action of the SFTP connector for workflows?
The Download File (v6) action under SFTP connector for workflows lets you download a particular file from a remote SFTP server. Following methods are available under the Download File (v6) action:
-
FastGet
The FastGet method is used to transfer large files from a remote server. It focuses on transferring chunks of a file in batches rather than the entire file to achieve faster throughput.
When you select FastGet as the download method, the following fields appear on screen:
- ChunkSize: This field specifies the amount of data (in bytes) to be transferred in a batch at a time between the workflow SFTP connector and remote SFTP server. The default value for this field is 4096 bytes.
- Concurrency: This field specifies the number of batch transfers to be allowed simultaneously. The default value for this field is 1.
Note: If the values configured for the Chunk Size, Concurrency, and Workflow Runtime fields are insufficient to complete the file download, the workflow can run into a Timeout error. For example, if the file you want to download is 800 MB and the configured values for Chunk Size, Concurrency, and Workflow Runtime fields are 4096, 1, and 3 minutes respectively, then by the end of the workflow execution, the file download will be incomplete and you will receive a Timeout error. -
Get
The Get method is used to navigate to the relevant directory and transfer the specified file from the remote server to the local machine using the SFTP protocol.
Flow service Actions
-
cd: Changes the working directory on the remote SFTP server.
-
chgrp: Changes the group ownership of one or more remote files.
-
chmod: Changes permission of one or more remote files.
-
chown: Changes the owning user of one or more remote files.
-
get: Retrieves a specific file from a remote SFTP server.
-
ls: Retrieves a list of files along with other associated details such as permissions and ownership information from a specified remote directory. If no remote directory is mentioned, the file listing of the current remote directory will be retrieved.
-
mkdir: Creates a new remote directory.
-
put: Transfers a file to a remote SFTP server.
-
pwd: Displays the remote working directory in the SFTP server.
-
rename: Renames a file or directory on a remote SFTP server.
-
rm: Deletes one or more remote files on the SFTP server.
-
rmdir: Deletes one or more remote directories on the SFTP server.
-
symlink: Creates a symbolic link between the old path and new path of a specific file.
Additional Information
SFTP V1 | Details |
---|---|
Preferred Key Exchange Algorithms |
|
Preferred Key Exchange Algorithms are the algorithms that Integration Server presents to the SFTP server for key exchange.