Class SimpleScpClientImpl

    • Constructor Detail

      • SimpleScpClientImpl

        public SimpleScpClientImpl()
      • SimpleScpClientImpl

        public SimpleScpClientImpl​(SimpleClient client)
    • Method Detail

      • setClient

        public void setClient​(SimpleClient client)
      • setScpClientCreator

        public void setScpClientCreator​(ScpClientCreator scpClientCreator)
      • scpLogin

        public CloseableScpClient scpLogin​(java.net.SocketAddress target,
                                           java.lang.String username,
                                           java.lang.String password)
                                    throws java.io.IOException
        Description copied from interface: SimpleScpClient
        Creates an SCP session using the provided credentials
        Specified by:
        scpLogin in interface SimpleScpClient
        Parameters:
        target - The target SocketAddress
        username - Username
        password - Password
        Returns:
        Created CloseableScpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • scpLogin

        public CloseableScpClient scpLogin​(java.net.SocketAddress target,
                                           java.lang.String username,
                                           java.security.KeyPair identity)
                                    throws java.io.IOException
        Description copied from interface: SimpleScpClient
        Creates an SCP session using the provided credentials
        Specified by:
        scpLogin in interface SimpleScpClient
        Parameters:
        target - The target SocketAddress
        username - Username
        identity - The KeyPair identity
        Returns:
        Created CloseableScpClient - Note: closing the client also closes its underlying session
        Throws:
        java.io.IOException - If failed to login or authenticate
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface java.nio.channels.Channel
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException