Class BaseSshTask<T extends BaseSshTask<T,​E>,​E extends BaseSshTaskProperties>

    • Constructor Detail

      • BaseSshTask

        public BaseSshTask()
    • Method Detail

      • host

        public T host​(@NotNull
                      @NotNull String host)
        Hostname or IP address of the remote host.
      • host

        public T host​(@NotNull
                      @NotNull String... host)
        Hostnames or IP addresses of the remote hosts.
      • username

        public T username​(@NotNull
                          @NotNull String username)
        Username you want to use to access the remote host.
      • authenticateWithPassword

        public T authenticateWithPassword​(@NotNull
                                          @NotNull String password)
        Authenticate with password associated with username username(String).
      • authenticateWithKeyWithPassphrase

        public T authenticateWithKeyWithPassphrase​(@NotNull
                                                   @NotNull String key,
                                                   @NotNull
                                                   @NotNull String passphrase)
        Authenticate with key with passphrase.
        Parameters:
        key - - SSH private key
        passphrase - - SSH passphrase
      • authenticateWithKeyWithPassphrase

        public T authenticateWithKeyWithPassphrase​(@NotNull
                                                   @NotNull Path keyPath,
                                                   @NotNull
                                                   @NotNull String passphrase)
        Authenticate with key with passphrase.
        Parameters:
        keyPath - - path to SSH private key
        passphrase - - SSH passphrase
      • authenticateWithKey

        public T authenticateWithKey​(@NotNull
                                     @NotNull String key)
        Authenticate with key (without passphrase).
        Parameters:
        key - - SSH private key
      • authenticateWithKey

        public T authenticateWithKey​(@NotNull
                                     @NotNull Path keyPath)
        Authenticate with key (without passphrase).
        Parameters:
        keyPath - - path to SSH private key
      • authenticateWithSshSharedCredentials

        public T authenticateWithSshSharedCredentials​(@NotNull
                                                      @NotNull SharedCredentialsIdentifier sharedCredentials)
      • authenticateWithUsernamePasswordSharedCredentials

        public T authenticateWithUsernamePasswordSharedCredentials​(@NotNull
                                                                   @NotNull SharedCredentialsIdentifier sharedCredentials)
      • hostFingerprint

        public T hostFingerprint​(@NotNull
                                 @NotNull String hostFingerprint)
        Set public key fingerprint.
      • port

        public T port​(int port)
        Set the port number of the remote host that is used for the SSH connection. The default value is 22.
        See Also:
        portDefault()
      • portDefault

        public T portDefault()
        Set the port number of the remote host to the default value (22).
        See Also:
        portDefault()