public class SecureKeys extends Object implements Authentication, JSchBasedAuthentication
Authentication.
Copyright (c) 2014. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Modifier and Type | Method and Description |
|---|---|
void |
configureFramework(com.jcraft.jsch.JSch jsch)
|
void |
configureSession(com.jcraft.jsch.Session session)
|
static SecureKeys |
fromKeyFiles(String publicKeyFileName,
String privateKeyFileName)
Construct
SecureKeys given the public and private key files. |
static SecureKeys |
fromPrivateKeyFile(String privateKeyFileName)
Construct
SecureKeys given a private key in a file. |
public void configureFramework(com.jcraft.jsch.JSch jsch)
JSchBasedAuthenticationconfigureFramework in interface JSchBasedAuthenticationjsch - the JSch framework to configurepublic void configureSession(com.jcraft.jsch.Session session)
JSchBasedAuthenticationconfigureSession in interface JSchBasedAuthenticationsession - the Session to configurepublic static SecureKeys fromPrivateKeyFile(String privateKeyFileName)
SecureKeys given a private key in a file.
Typically the private key file is something like: ~/.ssh/id_dsa and the corresponding public key file is assumed to be something like: ~/.ssh/id_dsa.pub
privateKeyFileName - the path to the private key fileSecureKeyspublic static SecureKeys fromKeyFiles(String publicKeyFileName, String privateKeyFileName)
SecureKeys given the public and private key files.
Typically the private key file is something like: ~/.ssh/id_dsa and the corresponding public key file something like: ~/.ssh/id_dsa.pub
publicKeyFileName - the path to the public key fileprivateKeyFileName - the path to the private key fileSecureKeysCopyright © 2017. All rights reserved.