| Namespace | http://www.mulesoft.org/schema/mule/ssh |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/ssh/current/mule-ssh.xsd (View Schema) |
| Schema Version | 1.2.1 |
| Minimum Mule Version | 3.2 |
Cloud Connector for ssh that is capable to handle multiple session from different users and reusing the session of any given user if he wants to send multiple messages. Notice that while this connector can handle N sessions for N users, each user can only have 1 active session at a time
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Sends the provided content to the SSH host.
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ssh="http://www.mulesoft.org/schema/mule/ssh"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ssh
http://www.mulesoft.org/schema/mule/ssh/current/mule-ssh.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Java Type | MIME Type | Encoding | Optional. Give a name to this configuration so it can be later referenced. | ||||
| If not null, a flow with this name will be fetched from the registry and invoked everytime data is received from the other end. | |||||||||||
| Optional. The size of the receiver buffer in bytes. | |||||||||||
| if true, the connection will be opened in shell mode, meaning that the session context will be maintained from the moment it's stablished until it's closed. | |||||||||||
| message timeout | |||||||||||
This connector offers automatic connection management via the use of a connection pool. The pool will act a storage mechanism for all the connections that are in-use by the user of this connector.
Prior to execution of a processor, the connector will attempt to lookup an already established connection and if one doesn't exists it will create one. That lookup mechanism is done in the connection pool via the use of connection variables declared as keys.
The user of the connector can configure the pool by adding a connection-pooling-profile to the connector configuration like this:
<ssh:connection-pooling-profile maxActive="10" maxIdle="10"
exhaustedAction="WHEN_EXHAUSTED_GROW" maxWait="120" minEvictionMillis="60000" evictionCheckIntervalMillis="30000"/>
The following is a list of connection attributes, each connection attribute can be configured at the config element level or they can also be added to each processor. If they are used at the processor level they get the benefit of full expression resolution.
| Connection Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
| Optional. Specify which configuration to use. | |||||||||||
| The username for the login | String | */* | UTF-8 | ||||||||
| The password for the login | String | */* | UTF-8 | ||||||||
| The address for the target host | String | */* | UTF-8 | ||||||||
| TCP port number in which the host is listening | Integer | */* | |||||||||
Reconnection Strategies specify how a connector behaves when its connection fails. You can control how Mule attempts to reconnect by specifying a number of criteria:
With a reconnection strategy, you can better control the behavior of a failed connection, by configuring it, for example, to re-attempt the connection only once every 15 minutes, and to give up after 30 attempts. You can also send an automatic notification to your IT administrator whenever this reconnection strategy goes into effect. You can even define a strategy that attempts to reconnect only during business hours. Such a setting can prove useful if your server is frequently shut down for nightly maintenance.
A reconnection strategy that allows the user to configure how many times a reconnection should be attempted and how long to wait between attempts.
<ssh:config>
<reconnect count="5" frequency="1000"/>
</ssh:config>
| Reconnect Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | Default Value | Description | |||||||||
| Optional. How often (in ms) to reconnect | |||||||||||
| Optional. How many reconnection attempts to make | |||||||||||
For more information about reconnection strategies in Mule, or even how to write your own custom reconnection strategy please check this section.
Sends the provided content to the SSH host. When the response is received, a new mule message will be generated and will be sent to the configured callback flow. That message will carry the response on the payload and will also include an inbound property called SSH_CALLBACK_USER that specifies the name of the user for whom the resopnse was sent.
INCLUDE_ERROR
| Name | Default Value | Description | Java Type | MIME Type | Encoding | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Optional. Specify which configuration to use. | |||||||||||
| The content to send | String | */* | UTF-8 | ||||||||
| false | Optional. If true, then a new line character is added at the end of the conent | boolean | */* | ||||||||
| Connection Parameters This are only required if you didn't specified them at the configuration element. They are also useful for overriding the values of the configurations or even if you need to extract them from the Mule message since they support expression evaluation. | |||||||||||
| Optional. The username for the login | String | */* | UTF-8 | ||||||||
| Optional. The password for the login | String | */* | UTF-8 | ||||||||
| Optional. The address for the target host | String | */* | UTF-8 | ||||||||
| Optional. TCP port number in which the host is listening | Integer | */* | |||||||||
| Payload Class | Description |
|---|---|
| IOException | is there was an error in the line |