Default SFTP session factory
Session factory for creating connections with an SFTP server.
Simple SFTP session factory that doesn't provide session caching/pooling, but creates a new session for every request.
When used by a SFTP inbound channel adapter this creates a new session + login attempt each time the adapter synchronizes the remote SFTP directory. When used by a SFTP outbound channel adapter this creates a new session + login attempt each time the adapter receives a message.
Note: SFTP = SSH File Transfer Protocol, an extension of the Secure Shell protocol (SSH) to provide secure file transfer capability. Not to be confused with "regular" FTP(S), which is a completely unrelated (and incompatible) file transfer protocol.
Please be aware that, depending on the SSH encryption level used by the server, you might need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files to successfully establish secure connections.
Id
Name that uniquely identifies this flow component.
Required
Timeout
The timeout property is used as the socket timeout parameter, as well as the default connection timeout.
Default is 0
, indicating that no timeout will occur.
Client version
Allows you to set the client version property.
The default depends on the underlying JSch version, but it will look like SSH-2.0-JSCH-0.1.54
.
Host key alias
The host key alias, used when comparing the host key to the known hosts list. This is useful when multiple SSH servers with different host keys are located on the same host.
Optional
Server alive interval
The timeout interval (in milliseconds) before a server-alive message is sent, in case no message is received from the server.
Server alive count max
Specifies the number of server-alive messages, which will be sent without any reply from the server before disconnecting.
Default is 1
.
Enable daemon thread
If enabled all threads will be daemon threads, i.e. their running does not avoid a shutdown of the VM. If disabled normal non-deamon threads will be used (and the VM can only shutdown after disconnecting).
Default is false
.
Allows you to specify additional (custom) configuration settings on the underlying JSch session.
Optional
Host
The host you want connect to.
Required
Port
The port over which the SFTP connection shall be established.
Default is 22
.
User
The remote user to use.
Required
Password
The password to authenticate against the remote host.
One of password or private key is required.
Private key
The location of the private key file used for authenticating against the remote host. Supported file formats include OpenSSH keys (.pem
, .key
, etc.) and PuTTY keys (.ppk
).
Example: resources/00-012345_my-key.pem
.
One of password or private key is required.
Private key passphrase
The password for the private key.
While it is not required to protect your key file with a password, it is highly recommended to do so.
Optional
Known hosts
Specifies the filename that will be used for a host key repository. The file has the same format as OpenSSH's known_hosts
file.
Required, unless allow unknown keys is enabled.
Allow unknown keys
Set to true
to unconditionally allow connecting to an unknown host or when a host's key has changed, or when a known hosts file is not available.
If you provide a (possibly empty) known hosts file and you enable allow unknown keys, the new key(s) will be added to the file automatically. You can use this to initially fill the known hosts file, after which you should deploy again with allow unknown keys disabled.
Note that allowing unknown keys makes the connection vulnerable to man-in-the-middle attacks.
Default is false
.