Package org.kiwiproject.jsch
Class SftpConfig.SftpConfigBuilder
java.lang.Object
org.kiwiproject.jsch.SftpConfig.SftpConfigBuilder
- Enclosing class:
- SftpConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()disableStrictHostChecking(boolean disableStrictHostChecking) Provides option to disable strict host key checking, equivalent to the-o StrictHostKeyChecking=[yes|no]option.The local directory to write out any errors if SFTP fails.The remote host to connect to via SFTP.knownHostsFile(String knownHostsFile) The path to the known hosts file.The password, only used if password authentication is used.port(int port) The SFTP port.preferredAuthentications(String preferredAuthentications) The comma-separated list of preferred authentication mechanisms.privateKeyFilePath(String privateKeyFilePath) The path to the private key file, only used if public key authentication is used.remoteBasePath(String remoteBasePath) The root directory of the remote SFTP location, provided as a convenience to store the remote path in the same place as the other SFTP properties.timeout(io.dropwizard.util.Duration timeout) SFTP connection timeout.toString()The remote user to connect with via SFTP.
-
Method Details
-
port
The SFTP port. Default is 22.- Returns:
this.
-
host
The remote host to connect to via SFTP.- Returns:
this.
-
user
The remote user to connect with via SFTP.- Returns:
this.
-
password
The password, only used if password authentication is used.- Returns:
this.
-
privateKeyFilePath
The path to the private key file, only used if public key authentication is used.- Returns:
this.
-
preferredAuthentications
The comma-separated list of preferred authentication mechanisms. Equivalent to the-o PreferredAuthentications=[gssapi-with-mic|hostbased|publickey|keyboard-interactive|password]option.The default is
publickey,passwordwhich differs from the default order in the SFTP command. See thessh_infoman page for details.- Returns:
this.
-
remoteBasePath
The root directory of the remote SFTP location, provided as a convenience to store the remote path in the same place as the other SFTP properties.It is not required nor currently used by
SftpConnectororSftpTransfers.- Returns:
this.
-
errorPath
The local directory to write out any errors if SFTP fails.- Returns:
this.
-
knownHostsFile
The path to the known hosts file.- Returns:
this.
-
disableStrictHostChecking
Provides option to disable strict host key checking, equivalent to the-o StrictHostKeyChecking=[yes|no]option.The default is false. See the
ssh_infoman page for more details.- Returns:
this.
-
timeout
SFTP connection timeout. Default is 5 seconds.- Returns:
this.- Implementation Note:
- The minimum duration annotation of 50 milliseconds is somewhat arbitrary, and is really just intended to ensure a positive value.
-
build
-
toString
-