Class SSHCredential.Builder

  • Enclosing class:
    SSHCredential

    public static class SSHCredential.Builder
    extends Object
    A builder for SSHCredential.
    • Method Detail

      • setSSHDirectory

        public SSHCredential.Builder setSSHDirectory​(String sshDirectory)
        The path to the ssh directory containing the private key file and known hosts file
        Parameters:
        sshDirectory - the ssh directory
        Returns:
        this builder instance
      • setSSHDirectory

        public SSHCredential.Builder setSSHDirectory​(File sshDirectory)
        The path to the ssh directory containing the private key file and known hosts file
        Parameters:
        sshDirectory - the ssh directory
        Returns:
        this builder instance
      • setPrivateKeyIdentity

        public SSHCredential.Builder setPrivateKeyIdentity​(String privateKeyIdentity)
        The name of the file containing the private key
        Parameters:
        privateKeyIdentity - the name of the private key file
        Returns:
        this builder instance
      • setPrivateKeyIdentities

        public SSHCredential.Builder setPrivateKeyIdentities​(String[] privateKeyIdentities)
        An array of the names of files containing private keys
        Parameters:
        privateKeyIdentities - the names of the private key files
        Returns:
        this builder instance
      • setPassphrase

        public SSHCredential.Builder setPassphrase​(Credential passphrase)
        The passphrase needed to decrypt the private key
        Parameters:
        passphrase - the passphrase used to decrypt the private key
        Returns:
        this builder instance
      • setKnownHostsFile

        public SSHCredential.Builder setKnownHostsFile​(String knownHostsFile)
        The name of the file containing the known hosts file
        Parameters:
        knownHostsFile - the name of the file containing the known SSH hosts
        Returns:
        this builder instance
      • build

        public SSHCredential build()
        Build a new instance of SSHCredential.
        Returns:
        a new SSHCredential instance