com.atlassian.bamboo.utils
Class SshKeysProvider
java.lang.Object
com.atlassian.bamboo.utils.SshKeysProvider
public class SshKeysProvider
- extends Object
Utility class for generation openssh compatible key pair
Generated keys are RSA keys. The key strength is currently hardcoded to 2048 bits
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SshKeysProvider
public SshKeysProvider()
throws NoSuchProviderException,
NoSuchAlgorithmException
- Throws:
NoSuchProviderException
NoSuchAlgorithmException
getRsaOpenSshKeyPair
public Pair<String,String> getRsaOpenSshKeyPair(String userComment)
throws InvalidKeySpecException,
IOException
- Provides freshly generated 2048-bit RSA key pair. User comment is added as a comment to public key content
- Parameters:
userComment
- comment added to public key
- Returns:
- Pair where first value is public key and the second is private key
- Throws:
InvalidKeySpecException
IOException
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.