#87 new: auto ask add system key (~/.ssh/id_rsa)

This commit is contained in:
lollipopkit
2023-08-04 21:46:44 +08:00
parent 60507ea4bc
commit 91967e6ce3
19 changed files with 129 additions and 76 deletions

View File

@@ -32,14 +32,14 @@ enum GenSSHClientStatus {
}
String getPrivateKey(String id) {
final key = locator<PrivateKeyStore>().get(id);
if (key == null) {
final pki = locator<PrivateKeyStore>().get(id);
if (pki == null) {
throw SSHErr(
type: SSHErrType.noPrivateKey,
message: 'key [$id] not found',
);
}
return key.privateKey;
return pki.key;
}
Future<SSHClient> genClient(