Mule ESB: SSH Connector
This Example Explains about running UNIX
commands in a remote ssh enabled UNIX/LINUX
machine using Mule ESB SSH Connector.
Pre-requisites
● Anypoint Studio 5.2.0 with SSH Connector
installed.
● Mule ESB Runtime 3.7.1
● SSH enabled unix/linux machine
Mule SSH Connector Flow
CallBack Flow for SSH Connector
SSH Connector Configuration
I am running below UNIX command using SSH
Connector
“touch tezt.xml”
Mule Flow Source
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0"
port="8081" doc:name="HTTP Listener Configuration"/>
<ssh:config name="SSH" username="anil" password="qwerty"
privateKeyFile="id_rsa" host="192.168.56.101" port="22" timeout="200"
callbackFlowName="callbackflow" receiverBufferSize="1024"
disableKnownHostsVerification="true" shellMode="true" doc:name="SSH"/>
<flow name="testsshFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/"
doc:name="HTTP"/>
<ssh:send config-ref="SSH" content="touch tezt.xml"
doc:name="SSH"/>
</flow>
<flow name="callbackflow">
<logger message="File Copied" level="INFO" doc:name="Logger"/>
</flow>
File Created in unix Machine

Mule ESB : ssh connector

  • 1.
    Mule ESB: SSHConnector This Example Explains about running UNIX commands in a remote ssh enabled UNIX/LINUX machine using Mule ESB SSH Connector.
  • 2.
    Pre-requisites ● Anypoint Studio5.2.0 with SSH Connector installed. ● Mule ESB Runtime 3.7.1 ● SSH enabled unix/linux machine
  • 3.
  • 4.
    CallBack Flow forSSH Connector
  • 5.
    SSH Connector Configuration Iam running below UNIX command using SSH Connector “touch tezt.xml”
  • 7.
    Mule Flow Source <http:listener-configname="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <ssh:config name="SSH" username="anil" password="qwerty" privateKeyFile="id_rsa" host="192.168.56.101" port="22" timeout="200" callbackFlowName="callbackflow" receiverBufferSize="1024" disableKnownHostsVerification="true" shellMode="true" doc:name="SSH"/> <flow name="testsshFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> <ssh:send config-ref="SSH" content="touch tezt.xml" doc:name="SSH"/> </flow> <flow name="callbackflow"> <logger message="File Copied" level="INFO" doc:name="Logger"/> </flow>
  • 8.
    File Created inunix Machine