Package org.wildfly.security.credential
Class SSHCredential.Builder
- java.lang.Object
-
- org.wildfly.security.credential.SSHCredential.Builder
-
- Enclosing class:
- SSHCredential
public static class SSHCredential.Builder extends Object
A builder for SSHCredential.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSHCredential
build()
Build a new instance of SSHCredential.SSHCredential.Builder
setKnownHostsFile(String knownHostsFile)
The name of the file containing the known hosts fileSSHCredential.Builder
setPassphrase(Credential passphrase)
The passphrase needed to decrypt the private keySSHCredential.Builder
setPrivateKeyIdentities(String[] privateKeyIdentities)
An array of the names of files containing private keysSSHCredential.Builder
setPrivateKeyIdentity(String privateKeyIdentity)
The name of the file containing the private keySSHCredential.Builder
setSSHDirectory(File sshDirectory)
The path to the ssh directory containing the private key file and known hosts fileSSHCredential.Builder
setSSHDirectory(String sshDirectory)
The path to the ssh directory containing the private key file and known hosts file
-
-
-
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
-
-