Class SftpSession

java.lang.Object
org.frankframework.filesystem.sftp.SftpSession
All Implemented Interfaces:
IConfigurable
Direct Known Subclasses:
SftpFileSystem

public class SftpSession extends Object implements IConfigurable
Helper class for sftp.
Author:
Niels Meijer
  • Constructor Details

    • SftpSession

      public SftpSession()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      configure() is called once at startup of the framework in the configure method of the owner of this IConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • openClient

      public com.jcraft.jsch.ChannelSftp openClient(String remoteDirectory) throws FileSystemException
      Throws:
      FileSystemException
    • isSessionStillWorking

      protected boolean isSessionStillWorking()
    • close

      public static void close(com.jcraft.jsch.ChannelSftp sftpClient)
    • close

      public void close()
    • setHost

      public void setHost(String string)
      Name or ip address of remote host
    • setPort

      public void setPort(int i)
      Port number of remote host
      Default value
      21
    • setAuthAlias

      public void setAuthAlias(String string)
      Name of the alias to obtain credentials to authenticatie on remote server
    • setUsername

      public void setUsername(String string)
      Name of the user to authenticatie on remote server
    • setPassword

      public void setPassword(String string)
      Password to authenticatie on remote server
    • setProxyHost

      public void setProxyHost(String string)
      Proxy hostname
    • setProxyPort

      public void setProxyPort(int i)
      Proxy port
      Default value
      1080
    • setProxyAuthAlias

      public void setProxyAuthAlias(String string)
      alias to obtain credentials to authenticate on proxy
    • setProxyUsername

      public void setProxyUsername(String string)
      Default user name in case proxy requires authentication
    • setProxyPassword

      public void setProxyPassword(String string)
      Default password in case proxy requires authentication
    • setProxyTransportType

      public void setProxyTransportType(SftpSession.TransportType type)
      Transport type in case of sftp
      Default value
      SOCKS5
    • setPrefCSEncryption

      public void setPrefCSEncryption(String string)
      Optional preferred encryption from client to server for sftp protocol
    • setPrefSCEncryption

      public void setPrefSCEncryption(String string)
      Optional preferred encryption from server to client for sftp protocol
    • setPrivateKeyFilePath

      public void setPrivateKeyFilePath(String string)
      Path to private key file for sftp authentication
    • setPrivateKeyAuthAlias

      public void setPrivateKeyAuthAlias(String string)
      Name of the alias to obtain credentials for passphrase of private key file
    • setPrivateKeyPassword

      public void setPrivateKeyPassword(String password)
      Passphrase of private key file
    • setKnownHostsPath

      public void setKnownHostsPath(String string)
      Path to file with knownhosts
    • setStrictHostKeyChecking

      public void setStrictHostKeyChecking(boolean b)
      Verify the hosts againt the knownhosts file.
      Default value
      true