INTSAMPLES-134: SFTP: Use Apache SSHD SshServer

JIRA: https://jira.spring.io/browse/INTSAMPLES-134

INTSAMPLES-134: `sun.misc.BASE64Decoder` -> `org.apache.sshd.common.util.Base64`

INTSAMPLES-134: PR comments and fix for Windows

INTSAMPLES-134 Test Samples with Remote Server

- change 'user' property to 'username' to avoid conflict with environment variable.
- create temporary files using the remote file template in 'si.sftp.sample'.
- clean up after test completion.
- use a caching session factory.
This commit is contained in:
Artem Bilan
2014-07-29 15:22:46 +03:00
committed by Gary Russell
parent 35e5156bdb
commit 90d5ee9282
19 changed files with 494 additions and 110 deletions

View File

@@ -6,11 +6,18 @@ This example demonstrates the following aspects of the SFTP support available wi
1. SFTP Inbound Channel Adapter (transfers files from remote to local directory)
2. SFTP Outbound Channel Adapter (transfers files from local to the remote directory)
In order to run this sample you need to:
In order to run this sample for the 'real' SFTP Server you need to:
1. generate private/public keys. Below is simple directions what needs to be done
2. update user.properties file with appropriate values
3. run the sample
By default this sample uses an [Apache MINA](http://mina.apache.org/sshd-project) embedded `SshServer` with predefined
private and public keys.
Note, the embedded Server is started only when the `port` property remains as `-1`. In this case the target port
for the Embedded Server is selected randomly. For a real SFTP server you should specify correct `host/port` properties.
NOTE: The test cases will create/delete a directory `si.sftp.sample`.
## INBOUND CHANNEL ADAPTER