feat: ssh-agent instead of filesystem based ssh keys

This commit is contained in:
Andras Bacsai
2023-09-14 10:12:58 +02:00
parent fe4a0ae166
commit 17c0e91a0d
20 changed files with 61 additions and 37 deletions

View File

@@ -14,6 +14,7 @@ class ShowPrivateKey extends Component
public function setPrivateKey($newPrivateKeyId)
{
try {
refresh_server_connection($this->server->privateKey);
$oldPrivateKeyId = $this->server->private_key_id;
$this->server->update([
'private_key_id' => $newPrivateKeyId
@@ -26,7 +27,7 @@ class ShowPrivateKey extends Component
'private_key_id' => $oldPrivateKeyId
]);
$this->server->refresh();
refresh_server_connection($this->server->privateKey);
refresh_server_connection($this->server->privateKey);
return general_error_handler($e, that: $this);
}
}