scp egress connector

SCP Egress Connector

Version: 17.01

Supported Since: 17.01

What is SCP Egress Connector?

SCP (Secure Copy) transport allows the files in the local file system or a remote file system to be copied to the local files system or a remote file system. This uses SSH for data transfer and provides the same authentication and same level of security as SSH. Authentication between two hosts can be done using the private and public key pair or username and password. This transport will scan for the files which matches the given pattern in a given directory and executes according the parameters set by the user.

The SCP Egress Connector can be used to copy files from a local machine to remote machine. Any message injected to UltraESB as a message and post processed withing UltraESB as user required will be copied to remote machine using SCP.

The remote file system can be a local file system as well. If you configure localhost system as the remote system files will be copied from local system to local system.

How this Works?

We use JSch library which is a pure Java implementation of SSH2. JSch allows you to connect to an sshd server and use port forwarding, X11 forwarding, file transfer, etc., and you can integrate its functionality into your own Java programs. JSch is licensed under BSD style license.

The sample use cases below depict an integration flow with SCP Egress Connector.

Sample Use Case

Prerequisite

In order to use the SCP Egress Connector you must first select the “SCP Connector” dependency from the connector list when you are creating an empty Ultra project. If you have already created a project, you can add the “SCP Connector” dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list, select the “SCP Connector” dependency.

Use case description

In this use case scenario, there is a system which scans and copy files from a remote server and copy files to another remote server using SCP. This use both SCP Ingress Connector and SCP Egress Connector.

Implementation

First let’s create our integration flow named “SampleFlow” and add a SCP Egress Connector to that. Then you need to configure your SCP Egress Connector by configuring it’s Basic parameters as below.

scp egress connector 1

After filling out the required parameters, this configuration can be saved by clicking the Save button at the bottom of the configuration pane of the SCP Egress Connector.

Then we should add the SCP Ingress Connector which will copy the files from remote file system to a local file system. See the configurations of SCP Ingress Connector. Then will the flow will be as follows.

scp egress connector 2

Now if you run the flow, and put any file which matches the file pattern you configured into the directory you specified that will be copied to your local file system and then it will be copied to your remote file system mentioned at the egress connector.

Out Ports

Processor

The message will be sent to this outport for the next processing element

On Exception

The message will be sent to this outport if the processing element failed to transform the payload due to some reason

Parameters

* marked fields are mandatory

SCP Host *

Basic

Host name/IP of the remote machine that you are going to send files using SCP

SCP Remote Port

Basic

Port of the remote machine that you are going to connect to copy the files using SCP. By default value of this will be set to 22

File Path *

Basic

Path of the remote machine that you are going to copy files to. This path should be relative to the home directory of the above given user

File Name

Basic

File name to be used while sending files to remote machine. If this is empty, framework will expect this as transport header with name "ultra.file.name". Optionally user can configure this file name based on either Variable, Transport Header or message properties which can be set dynamically.

Username

Basic

Username that you are going to use to connect to the remote machine

Password

Basic

Password for above user name if you are going to connect via password based authentication to the remote machine

Key File Path

Key Authentication

Path of the private key of the user which will be used to communicate with remote machine via key based authentication.

Key Password

Key Authentication

Password of the private key if it’s password protected.

Host Key Check

Key Authentication

Set to enable the host key checking while creating the communication channel with remote machine. If this is not enabled, host key checking will be skipped while SCP processing. By default, this will be false.

Max Connections

Advanced

Maximum number of connections which will be cached within the SCP Egress Connector for the configured remote machine. By default, this value is 10.

Timeout

Advanced

Timeout in millis, to be used while connecting to the remote machine. If it couldn’t establish a connection with the remote machine within this time period, it will be considered as a connection failure and notify to the user. By default, this value is 60000.

Egress Timeout

Advanced

Timeout value in milliseconds for the egress message

Weight

Fail-Over

Weight for the Egress Connector if this Egress Connector is under a weighted Egress Load Balancer

In this topic
In this topic
Contact Us