/n software Connectors for MuleSoft

Questions / Feedback?

SExec Connector

Properties   Configuration Settings  

The SExec Component enables your MuleSoft to execute remote commands over SSH.


The SExec Connector uses the SSH "exec" subsystem to remotely execute commands from your Mule Project.

SExec Send Connector

The SExec Send Connector provides an ultra light-weight remote command execution client for your Mule Project. You must first set an SSHHost. If the SSH server requires authentication, you should set the necessary SSHUser, and either SSHPassword or SSHCert depending on the SSHAuthMode you wish to use. Once the SSH server information is set, you must enter the Command you wish to execute.

Whenever called from the Mule Project, the connector will execute the given command. If the outbound message has any data, that data will be supplied to the executing command's standard input.

Once the command has finished executing, the connector will write the output from the command's standard out pipe to the CommandStdOut property in the message context. It will also write the command's exit code to the CommandExitStatus property, and any data from the standard err pipe to the CommandErrorMessage property in the message context.

Send Example

Add an SExec Send connector to the body of your flow. Just as an example, say you would like to execute a script in the SSH user's home directory on the server. Configure the connection settings appropriately and set the Command property to:

sh script.sh 

For the purposes of this example, lets say the contents of the script on the remote machine are as follows:

echo "Hello from my script!"

The connector will write the standard output resulting from the Command to both the payload of the Mule Message and the CommandStdOut attribute. A logger which prints the message payload behind the SExec Connector in this case shows:

org.mule.runtime.core.internal.processor.LoggerMessageProcessor: Hello from my script!

Additional information about the command such as CommandExitStatus, CommandErrorMessage, and CommandStdErr are available in the attributes collection.

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.

CommandThe command to be sent to the remote host.
CommandErrorMessageThe error message, if any, returned by the server after command execution.
CommandExitStatusThe exit code for the executed command for the current message.
CommandSSHUserThe SSH user name used by the component when executing the command.
CommandStdErrThe standard error output of the executed Command .
CommandStdOutThe standard output of the executed Command .
FailOnErrorControls how the component treats error codes returned by command execution.
FirewallA set of properties related to firewall access.
LogFileThe file to write logging information to at runtime.
LogModeWhat information gets logged during component execution.
LogTypeHow information gets logged during component execution.
OtherDefines a set of configuration settings to be used by the component.
PersistentConnectionInstructs the component whether to keep the connection to the server open.
RuntimeLicenseSpecifies the component runtime license key.
SSHAcceptServerHostKeyInstructs the component to accept the server host key that matches the supplied key.
SSHAuthModeThe type of authentication used by the component.
SSHCertThe certificate to use for client authentication during the SSH handshake.
SSHCompressionAlgorithmsA comma-separated list of compression algorithms allowed for this connection.
SSHHostThe address of the SSH host.
SSHPasswordThe password for SSH password-based authentication.
SSHPortThe port on the SSH server where the SSH service is running; by default, 22.
SSHUserThe username for SSH authentication.
TimeoutA 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.

KeyRenegotiationThresholdSets the threshold for the SSH Key Renegotiation.
LogSSHPacketsIf True, detailed SSH packet logging is performed.
SSHAcceptServerHostKeyFingerPrintInstructs the component to accept the server's host key with this fingerprint.
SSHEncryptionAlgorithmsA comma-separated list containing all allowable compression algorithms.
SSHKeyExchangeAlgorithmsSpecifies the supported key exchange algorithms.
SSHMacAlgorithmsSpecifies the supported Mac algorithms.
SSHPublicKeyAlgorithmsSpecifies the supported public key algorithms.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
TcpNoDelayWhether or not to delay when sending packets.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 8318]