Package hudson.plugins.ec2
Class EC2PrivateKey
java.lang.Object
hudson.plugins.ec2.EC2PrivateKey
RSA private key (the one that you generate with ec2-add-keypair.)
Starts with "----- BEGIN RSA PRIVATE KEY------\n".
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptiondecryptWindowsPassword(String encodedPassword) booleanstatic EC2PrivateKeystatic EC2PrivateKeyfetchFromDisk(String filepath) find(software.amazon.awssdk.services.ec2.Ec2Client ec2) Finds theKeyPairInfothat corresponds to this key in EC2.Obtains the fingerprint of the key in the "ab:cd:ef:...:12" format.inthashCode()booleanIs this file really a private key?toString()
-
Method Details
-
getPrivateKey
-
getPrivateKeySecret
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Secret getPrivateKeySecret() -
getFingerprint
Obtains the fingerprint of the key in the "ab:cd:ef:...:12" format.- Throws:
IOException- if the underlying private key is invalid: empty or password protected (password protected private keys are not yet supported)
-
getPublicFingerprint
- Throws:
IOException
-
isPrivateKey
Is this file really a private key?- Throws:
IOException
-
find
public KeyPair find(software.amazon.awssdk.services.ec2.Ec2Client ec2) throws IOException, software.amazon.awssdk.core.exception.SdkException Finds theKeyPairInfothat corresponds to this key in EC2.- Throws:
IOExceptionsoftware.amazon.awssdk.core.exception.SdkException
-
decryptWindowsPassword
public String decryptWindowsPassword(String encodedPassword) throws software.amazon.awssdk.core.exception.SdkException - Throws:
software.amazon.awssdk.core.exception.SdkException
-
fetchFromDisk
-
fetchFromDisk
-
hashCode
public int hashCode() -
equals
-
toString
-