public class SSHKeyPair extends AbstractSSHKey
Modifier and Type | Method and Description |
---|---|
static SSHKeyPair |
create(SSHKeyType type,
String passPhrase,
String privateKeyPath,
String publicKeyPath)
Creates private and public ssh-rsa keys and stores them to the given
paths.
|
static SSHKeyPair |
create(String passPhrase,
String privateKeyPath,
String publicKeyPath) |
String |
getPrivateKeyPath() |
String |
getPublicKey()
Returns the content of the public key (key content without ssh-rsa
identifier nor comment) of the ssh key
|
String |
getPublicKeyPath() |
static SSHKeyPair |
load(String privateKeyPath,
String publicKeyPath)
Loads existing private and public ssh key from the given paths.
|
equals, getKeyType, hashCode, setKeyType, setKeyType, toString
public static SSHKeyPair create(String passPhrase, String privateKeyPath, String publicKeyPath) throws OpenShiftException
OpenShiftException
public static SSHKeyPair create(SSHKeyType type, String passPhrase, String privateKeyPath, String publicKeyPath) throws OpenShiftException
passPhrase
- the pass phrase to set to the new keyprivateKeyPath
- the path where the new private key gets storedpublicKeyPath
- the path where the new public key gets storedOpenShiftException
- if the key could not be createdpublic static SSHKeyPair load(String privateKeyPath, String publicKeyPath) throws OpenShiftException
privateKeyPath
- the path to the private keypublicKeyPath
- the path to the public keyOpenShiftException
public String getPublicKey()
ISSHPublicKey
public String getPrivateKeyPath()
public String getPublicKeyPath()
Copyright © 2013 JBoss by Red Hat. All rights reserved.