Package org.wildfly.security.credential
Class SSHCredential
java.lang.Object
org.wildfly.security.credential.SSHCredential
- All Implemented Interfaces:
Cloneable,Credential
A credential holding the location, key identity and passphrase (instance of
Credential) of a Private key in an external
file and/or the name of the file containing the known hosts- Author:
- Ashley Abdel-Sayed
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.wildfly.security.credential.Credential
NO_CREDENTIALS -
Method Summary
Modifier and TypeMethodDescriptionstatic SSHCredential.Builderbuilder()clone()Creates and returns a copy of thisCredential.booleanGet the file containing the known SSH hostsGet the passphrase used to decrypt the private keyString[]Get the list of private key file namesGet the SSH directory containing the private key file and known hosts fileinthashCode()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.credential.Credential
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, matches, matches, matches, verify, verify
-
Field Details
-
DEFAULT_SSH_DIRECTORY
-
DEFAULT_PRIVATE_KEYS
-
DEFAULT_KNOWN_HOSTS
-
-
Method Details
-
getSshDirectory
Get the SSH directory containing the private key file and known hosts file- Returns:
- the SSH directory
-
getPrivateKeyIdentities
Get the list of private key file names- Returns:
- the private key identities
-
getPassphrase
Get the passphrase used to decrypt the private key- Returns:
- the passphrase
-
getKnownHostsFile
Get the file containing the known SSH hosts- Returns:
- the known hosts file name
-
clone
Description copied from interface:CredentialCreates and returns a copy of thisCredential.- Specified by:
clonein interfaceCredential- Overrides:
clonein classObject- Returns:
- a copy of this
Credential.
-
hashCode
public int hashCode() -
equals
-
builder
-