diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/keys/SshKeyPair.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/keys/SshKeyPair.kt new file mode 100644 index 0000000..3e08a65 --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/keys/SshKeyPair.kt @@ -0,0 +1,15 @@ +package org.domaindrivenarchitecture.provs.framework.ubuntu.keys + +import org.domaindrivenarchitecture.provs.framework.core.Secret + +class SshKeyPair(publicKey: Secret, privateKey: Secret) : KeyPair(publicKey, privateKey) { + + val keyType = publicKey.plain().substringBefore(" ") + + val sshAlgorithmName = + if (keyType.startsWith("ssh-")) { + keyType.removePrefix("ssh-") + } else { + "unknownKeyType" + } +} \ No newline at end of file