Secure Shell Transport
SSH transport can execute shell command via SSH.
You can get release version jar from here.
Current version is 2.2.1.0.
Rquirement
Mule ESB: version 2.2.1 or later.
(not supported verson 2.1.x and 1.x)
Java : JDK 1.5 or later.
SSH Deamon configuration
First, you should read SSHD(8)Manual Page.
You should edit following setting :
/etc/sudoer
# disenable to "Defaults requiretty"
Defaults requiretty no
Using Public Key Authentication
If using public key authentication, you should configure like following:
/etc/ssh/sshd_config
# Authentication:
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
and execute
ssh-keygen
$HOME/.ssh/authorized_keys
$ mkdir $HOME/.ssh
$ cd $HOME/.ssh
$ ssh-keygen -t rsa -b 1024
(Enter passphrase something)
$ cat id_rsa.pub >> authorized_keys
$ rm id_rsa.pub
$ chmod 600 authorizd_keys
and you should copy
id_rsa to Mule server.
Dependencies
- JSch (0.1.29)
- JZlib (1.0.7)
Mule Configuration Sample
see following links
Getting Source Codes
please see Source.
How to build
- get ssh transport source codes from svn repository.
- install commons-ssh-1.3.jar to maven local reposigor.
$ mvn install:install-file -Dfile=lib/commons-ssh-1.3.jar -DgroupId=commons-ssh \
-DartifactId=commons-ssh -Dversion=1.3 -Dpackaging=jar
- run "mvn package"
License
Ssh Transport is published under the terms of the CPAL v1.0 license.
please see CPAL.
Configuration Referance
Connector
Attribute Name |
description |
default value |
required? |
Host |
host name or ip address |
|
yes |
port |
port number |
22 |
no |
loginId |
login id |
|
yes |
password |
login password or a keypass of private key |
|
no |
privateKeyPath |
key file path (absolute path or relative path).
if not setting value, ssh transport try to authenticate using password. |
|
no |
kexTimeout |
key exchange timeout (ms) |
5000 |
no |
Outbound Endpoint
Attribute Name |
description |
default value |
required? |
ssh |
configured "SEND" string (fixed value) |
|
yes |
useSudo |
|
false |
no |
sudoPassword |
|
|
no |
encoding |
remote server's encoding.
(e.g. UTF-8, SJIS, EUC-JP, CP943, ISO-2022-JP) |
UTF-8 |
no |
responseTimeout |
|
10000 |
no |