AccountApi: Add SSH key methods
Add methods to list the SSH keys, and add an SSH key. Change-Id: Ie3e058ea8ecab5dff11678570f81cc7742a26c3f
This commit is contained in:
@@ -160,12 +160,12 @@ public class AccountCreator {
|
||||
return new AccountExternalId.Key(AccountExternalId.SCHEME_MAILTO, email);
|
||||
}
|
||||
|
||||
private static KeyPair genSshKey() throws JSchException {
|
||||
public static KeyPair genSshKey() throws JSchException {
|
||||
JSch jsch = new JSch();
|
||||
return KeyPair.genKeyPair(jsch, KeyPair.RSA);
|
||||
}
|
||||
|
||||
private static String publicKey(KeyPair sshKey, String comment)
|
||||
public static String publicKey(KeyPair sshKey, String comment)
|
||||
throws UnsupportedEncodingException {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
sshKey.writePublicKey(out, comment);
|
||||
|
||||
Reference in New Issue
Block a user