Package org.wildfly.security.credential
Class SSHCredential
- java.lang.Object
 - 
- org.wildfly.security.credential.SSHCredential
 
 
- 
- All Implemented Interfaces:
 Cloneable,Credential
public class SSHCredential extends Object implements Credential
A credential holding the location, key identity and passphrase (instance ofCredential) 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 Modifier and Type Class Description static classSSHCredential.BuilderA builder for SSHCredential. 
- 
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_KNOWN_HOSTSstatic String[]DEFAULT_PRIVATE_KEYSstatic FileDEFAULT_SSH_DIRECTORY- 
Fields inherited from interface org.wildfly.security.credential.Credential
NO_CREDENTIALS 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SSHCredential.Builderbuilder()Credentialclone()Creates and returns a copy of thisCredential.booleanequals(Object obj)StringgetKnownHostsFile()Get the file containing the known SSH hostsCredentialgetPassphrase()Get the passphrase used to decrypt the private keyString[]getPrivateKeyIdentities()Get the list of private key file namesFilegetSshDirectory()Get 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, wait 
- 
Methods inherited from interface org.wildfly.security.credential.Credential
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, matches, matches, matches, verify, verify 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getSshDirectory
public File getSshDirectory()
Get the SSH directory containing the private key file and known hosts file- Returns:
 - the SSH directory
 
 
- 
getPrivateKeyIdentities
public String[] getPrivateKeyIdentities()
Get the list of private key file names- Returns:
 - the private key identities
 
 
- 
getPassphrase
public Credential getPassphrase()
Get the passphrase used to decrypt the private key- Returns:
 - the passphrase
 
 
- 
getKnownHostsFile
public String getKnownHostsFile()
Get the file containing the known SSH hosts- Returns:
 - the known hosts file name
 
 
- 
clone
public Credential 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. 
 
- 
builder
public static SSHCredential.Builder builder()
 
 - 
 
 -