Package org.wildfly.security.credential
Class SSHCredential.Builder
java.lang.Object
org.wildfly.security.credential.SSHCredential.Builder
- Enclosing class:
- SSHCredential
A builder for SSHCredential.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a new instance of SSHCredential.setKnownHostsFile(String knownHostsFile) The name of the file containing the known hosts filesetPassphrase(Credential passphrase) The passphrase needed to decrypt the private keysetPrivateKeyIdentities(String[] privateKeyIdentities) An array of the names of files containing private keyssetPrivateKeyIdentity(String privateKeyIdentity) The name of the file containing the private keysetSSHDirectory(File sshDirectory) The path to the ssh directory containing the private key file and known hosts filesetSSHDirectory(String sshDirectory) The path to the ssh directory containing the private key file and known hosts file
-
Method Details
-
setSSHDirectory
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
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
The name of the file containing the private key- Parameters:
privateKeyIdentity- the name of the private key file- Returns:
- this builder instance
-
setPrivateKeyIdentities
An array of the names of files containing private keys- Parameters:
privateKeyIdentities- the names of the private key files- Returns:
- this builder instance
-
setPassphrase
The passphrase needed to decrypt the private key- Parameters:
passphrase- the passphrase used to decrypt the private key- Returns:
- this builder instance
-
setKnownHostsFile
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
Build a new instance of SSHCredential.- Returns:
- a new SSHCredential instance
-