SFTP

Secure File Transfer Protocol (SFTP) is a secure version of the FTP, which processes the data access and data transfer over a Secure Shell (SSH) data stream.

Note:
  • Create separate accounts for the SFTP connector in workflows and flow services. Also, the names of the SFTP V1 account and SFTP V2 account must be unique.
  • You can establish a connection from your private VPC using a private link for this connector.
  • Public key authentication is not supported for the SFTP connector in deploy anywhere integrations.

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 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 the 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.

Flow service Actions

  • cd: Change the working directory on the remote SFTP server.

  • chgrp: Change the group ownership of one or more remote files.

  • chmod: Change permission of one or more remote files.

  • chown: Change the owning user of one or more remote files.

  • get: Retrieve a specific file from a remote SFTP server.

  • ls: List files from a specified remote directory, including details like permissions and ownership. If no directory is specified, it lists files from the current remote directory.

  • mkdir: Create a new remote directory.

  • put: Transfer a file to a remote SFTP server.

  • pwd: Display the remote working directory in the SFTP server.

  • rename: Rename a file or directory on a remote SFTP server.

  • rm: Remove one or more remote files on the SFTP server.

  • rmdir: Delete one or more remote directories on the SFTP server.

  • symlink: Create a symbolic link between the old path and the new path of a specific file.

Common questions

How to create an account for the SFTP connector?

To add an account for SFTP in webMethods Integration:

  • Drag any SFTP action onto the canvas and double-click the action.
  • Click "+" that is located next to the Connect to SFTP Server field. The Add Account window appears with the account configuration fields:
    • Account Name: The name for the SFTP account.
    • Host: The host or IP address of the SFTP server.
    • Port: The port number that you want to connect with.
    • Create Connection Using: The login type that you want to use to establish a connection.

    If you select Login Credential as the login type, the fields that appear are listed here:

    • 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 the 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 receives keep-alive packets every 3 seconds.
    • Keep Alive Count Max: Specify how many consecutive, unanswered SSH-level keepalive packets can be sent to the server before stopping the connection session. The default value for this field is 3. However, this field can be used with the Keep Alive Interval field. For example, if Keep Alive Interval is set to 2000 (2 seconds) and Keep Alive Count Max to 3, the server receives keep-alive packets every 2 seconds, up to 3 times, to maintain the connection. If the packets are unanswered thrice consecutively, the connection session is broken.

    If you select SSH Key as the login type, the fields that appear are listed here:

    • 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 the 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 receives 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 be used 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 receives keep-alive packets to keep the connection alive. If the packets are unanswered three times consecutively, the connection is broken automatically.
  • Next, click Save. The account for the SFTP connector is created.

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 recent host key to avoid 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 in the SFTP connector enables downloading a specific file from a remote SFTP server. The methods available under this action are listed here:

  • 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 the screen:

    • ChunkSize: Specifies the batch size (in bytes) for data transfer between the workflow SFTP connector and the remote SFTP server. The default 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. If a file is 800 MB and Chunk Size, Concurrency and Workflow Runtime are set to 4096, 1, and 3 minutes respectively, the download might timeout before completion.
  • Get

    The Get method is used to go to the relevant directory and transfer the specified file from the remote server to the local system using the SFTP protocol.

Additional information

SFTP V1 Details
Preferred Key Exchange Algorithms
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
  • diffie-hellman-group1
  • 4-sha1diffie-hellman-group-exchange-sha256
  • diffie-hellman-group-exchange-sha1
  • diffie-hellman-group1-sha1