Interface SimpleScpClient

  • All Superinterfaces:
    java.lang.AutoCloseable, java.nio.channels.Channel, java.io.Closeable
    All Known Implementing Classes:
    SimpleScpClientImpl

    public interface SimpleScpClient
    extends java.nio.channels.Channel
    A simplified synchronous API for obtaining SCP sessions.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default CloseableScpClient scpLogin​(java.lang.String host, int port, java.lang.String username, java.lang.String password)
      Creates an SCP session using the provided credentials
      default CloseableScpClient scpLogin​(java.lang.String host, int port, java.lang.String username, java.security.KeyPair identity)
      Creates an SCP session using the provided credentials
      default CloseableScpClient scpLogin​(java.lang.String host, java.lang.String username, java.lang.String password)
      Creates an SCP session on the default port and logs in using the provided credentials
      default CloseableScpClient scpLogin​(java.lang.String host, java.lang.String username, java.security.KeyPair identity)
      Creates an SCP session on the default port and logs in using the provided credentials
      default CloseableScpClient scpLogin​(java.net.InetAddress host, int port, java.lang.String username, java.lang.String password)
      Creates an SCP session using the provided credentials
      default CloseableScpClient scpLogin​(java.net.InetAddress host, int port, java.lang.String username, java.security.KeyPair identity)
      Creates an SCP session using the provided credentials
      default CloseableScpClient scpLogin​(java.net.InetAddress host, java.lang.String username, java.lang.String password)
      Creates an SCP session on the default port and logs in using the provided credentials
      default CloseableScpClient scpLogin​(java.net.InetAddress host, java.lang.String username, java.security.KeyPair identity)
      Creates an SCP session on the default port and logs in using the provided credentials
      CloseableScpClient scpLogin​(java.net.SocketAddress target, java.lang.String username, java.lang.String password)
      Creates an SCP session using the provided credentials
      CloseableScpClient scpLogin​(java.net.SocketAddress target, java.lang.String username, java.security.KeyPair identity)
      Creates an SCP session using the provided credentials
      • Methods inherited from interface java.nio.channels.Channel

        close, isOpen
    • Method Detail

      • scpLogin

        default CloseableScpClient scpLogin​(java.lang.String host,
                                            java.lang.String username,
                                            java.lang.String password)
                                     throws java.io.IOException
        Creates an SCP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host name or address
        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

        default CloseableScpClient scpLogin​(java.lang.String host,
                                            int port,
                                            java.lang.String username,
                                            java.lang.String password)
                                     throws java.io.IOException
        Creates an SCP session using the provided credentials
        Parameters:
        host - The target host name or address
        port - The target port
        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

        default CloseableScpClient scpLogin​(java.lang.String host,
                                            java.lang.String username,
                                            java.security.KeyPair identity)
                                     throws java.io.IOException
        Creates an SCP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host name or address
        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
      • scpLogin

        default CloseableScpClient scpLogin​(java.lang.String host,
                                            int port,
                                            java.lang.String username,
                                            java.security.KeyPair identity)
                                     throws java.io.IOException
        Creates an SCP session using the provided credentials
        Parameters:
        host - The target host name or address
        port - The target port
        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
      • scpLogin

        default CloseableScpClient scpLogin​(java.net.InetAddress host,
                                            java.lang.String username,
                                            java.lang.String password)
                                     throws java.io.IOException
        Creates an SCP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host InetAddress
        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

        default CloseableScpClient scpLogin​(java.net.InetAddress host,
                                            int port,
                                            java.lang.String username,
                                            java.lang.String password)
                                     throws java.io.IOException
        Creates an SCP session using the provided credentials
        Parameters:
        host - The target host InetAddress
        port - The target port
        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

        default CloseableScpClient scpLogin​(java.net.InetAddress host,
                                            java.lang.String username,
                                            java.security.KeyPair identity)
                                     throws java.io.IOException
        Creates an SCP session on the default port and logs in using the provided credentials
        Parameters:
        host - The target host InetAddress
        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
      • scpLogin

        default CloseableScpClient scpLogin​(java.net.InetAddress host,
                                            int port,
                                            java.lang.String username,
                                            java.security.KeyPair identity)
                                     throws java.io.IOException
        Creates an SCP session using the provided credentials
        Parameters:
        host - The target host InetAddress
        port - The target port
        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
      • scpLogin

        CloseableScpClient scpLogin​(java.net.SocketAddress target,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws java.io.IOException
        Creates an SCP session using the provided credentials
        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

        CloseableScpClient scpLogin​(java.net.SocketAddress target,
                                    java.lang.String username,
                                    java.security.KeyPair identity)
                             throws java.io.IOException
        Creates an SCP session using the provided credentials
        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