Class OpenSSHKeyV1KeyFile
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile
- All Implemented Interfaces:
FileKeyProvider,KeyProvider
Reads a key file in the new OpenSSH format.
The format is described in the following document: Key Protocol
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final org.slf4j.Loggerstatic final StringFields inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
kp, pwdf, resource, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(File location, PasswordFinder pwdf) voidinit(Reader privateKey, Reader publicKey, PasswordFinder pwdf) voidinit(String privateKey, String publicKey, PasswordFinder pwdf) protected KeyPairMethods inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
getPrivate, getType, init, init, init, init, init
-
Field Details
-
OPENSSH_PRIVATE_KEY
- See Also:
-
BCRYPT
- See Also:
-
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
OpenSSHKeyV1KeyFile
public OpenSSHKeyV1KeyFile()
-
-
Method Details
-
getPublic
- Specified by:
getPublicin interfaceKeyProvider- Overrides:
getPublicin classBaseFileKeyProvider- Returns:
- the public key.
- Throws:
IOException- if there is an I/O error retrieving the public key
-
init
- Specified by:
initin interfaceFileKeyProvider- Overrides:
initin classBaseFileKeyProvider
-
init
- Specified by:
initin interfaceFileKeyProvider- Overrides:
initin classBaseFileKeyProvider
-
init
- Specified by:
initin interfaceFileKeyProvider- Overrides:
initin classBaseFileKeyProvider
-
readKeyPair
- Specified by:
readKeyPairin classBaseFileKeyProvider- Throws:
IOException
-