SCP Connector
Properties Configuration Settings
The SCP Component adds SSH-secured file transfer capabilities to your MuleSoft.
Remarks
The SCP Connector adds a SCP client to your Mule Project that enables it with SSH-secured file download and upload functionality.
SCP Receive Connector
The SCP Receive Connector requires that a single property be set: SSHHost. You may also set an SSHPort if the server is not running on the default SSH port. In order to authenticate with the SSH server, you will need to specify an SSHUser, and either SSHPassword or SSHCert depending upon the SSHAuthMode to be used.
The connector will connect to the SCP server every PollingInterval and download the file(s) specified by FileMask. All files that match the FileMask will be downloaded and submitted to the Mule Project as individual messages.
Download Example
Add an SCP Receive source connector to your flow and configure the connection settings. That is all that is required to get started.
Optionally specify a RemotePath to change the working directory on the remote machine. The connector will handle connecting to the server and downloading a group of files. One Mule event is generated for each file downloaded.
Behind the SCP Receive connector you can add a File Write connector to write each file to disk. You will need to dynamically set the Path property on the File Write connector to accomplish this. Click the Mule expression indicator on the Path property and set the value to:
'C:\\temp\\'
++ attributes.ReceivedFileName
The received filename will then be used as the same filename on disk. The content of each file will be present in the payload of the Mule Message. That is all that is required to write an incoming file to disk. Additional properties about the file and SSH user are also available in the attributes collection.
SCP Send Connector
The SCP Send Connector requires both an SSHHost and a RemoteFile. You may also set an SSHPort if the server is not running on the default SSH port. In order to authenticate with the SSH server, you will need to specify an SSHUser, and either SSHPassword or SSHCert depending upon the SSHAuthMode to be used.
The connector will connect to the SCP server whenever it has a message to send. The connector will attempt to upload to the specified RemotePath.
Upload Files Example
To get started, add a File Read connector to your flow and configure it to read a target file. Behind the File Read connector, add an SCP Send module and configure the connection settings. There is no need to transform the output of the File Read connector before passing it to the SCP Send module.
The connector will upload the bytes in the payload to the specified RemoteFile at the location specified in RemotePath
Receiver Property List
The following is the full list of the properties of the receiver connector with short descriptions. Click on the links for further details.
FileMask | Indicates the type of files to download from the SSH server. |
Firewall | A set of properties related to firewall access. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
LogType | How information gets logged during component execution. |
Other | Defines a set of configuration settings to be used by the component. |
PersistentConnection | Instructs the component whether to keep the connection to the server open. |
ReceivedFileName | The name of the remote file received by the SCP component. |
ReceivedFilePath | The remote path of the received file. |
ReceivedFileSize | The size of the remote file received by the SCP component. |
ReceivedFileSSHUser | The SSH user name used by the SCP component when downloading the remote file. |
RemotePath | The current path on the SSH server. |
RuntimeLicense | Specifies the component runtime license key. |
SSHAcceptServerHostKey | Instructs the component to accept the server host key that matches the supplied key. |
SSHAuthMode | The type of authentication used by the component. |
SSHCert | The certificate to use for client authentication during the SSH handshake. |
SSHCompressionAlgorithms | A comma-separated list of compression algorithms allowed for this connection. |
SSHHost | The address of the SSH host. |
SSHPassword | The password for SSH password-based authentication. |
SSHPort | The port on the SSH server where the SSH service is running; by default, 22. |
SSHUser | The username for SSH authentication. |
TempPath | A temporary local directory where data can be stored before the component processes it. |
Timeout | A timeout for the component. |
Sender Property List
The following is the full list of the properties of the sender connector with short descriptions. Click on the links for further details.
Firewall | A set of properties related to firewall access. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
LogType | How information gets logged during component execution. |
Other | Defines a set of configuration settings to be used by the component. |
PersistentConnection | Instructs the component whether to keep the connection to the server open. |
RemoteFile | The name of the destination file on the SSH server for uploading. |
RemotePath | The current path on the SSH server. |
RuntimeLicense | Specifies the component runtime license key. |
SSHAcceptServerHostKey | Instructs the component to accept the server host key that matches the supplied key. |
SSHAuthMode | The type of authentication used by the component. |
SSHCert | The certificate to use for client authentication during the SSH handshake. |
SSHCompressionAlgorithms | A comma-separated list of compression algorithms allowed for this connection. |
SSHHost | The address of the SSH host. |
SSHPassword | The password for SSH password-based authentication. |
SSHPort | The port on the SSH server where the SSH service is running; by default, 22. |
SSHUser | The username for SSH authentication. |
Timeout | A timeout for the component. |
Configuration Settings
The following is a list of configuration settings for the connector with short descriptions. Click on the links for further details.
FilePermissions | Specifies the permissions of a file to be set after a successful upload. |
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
LogSSHPackets | If True, detailed SSH packet logging is performed. |
RecursiveMode | If set to true the component will recursively upload or download files. |
ServerResponseWindow | The time to wait for a server response in milliseconds. |
SSHAcceptServerHostKeyFingerPrint | Instructs the component to accept the server's host key with this fingerprint. |
SSHEncryptionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
SSHPublicKeyAlgorithms | Specifies the supported public key algorithms. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |