fix: improve localhost boarding process

This commit is contained in:
Andras Bacsai
2023-09-18 13:01:01 +02:00
parent deece51e83
commit c023be2348
4 changed files with 26 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ function remote_process(
// }
// // processWithEnv()->run("echo '{$server->privateKey->private_key}' | ssh-add -d -");
// }
function addPrivateKeyToSshAgent(Server $server)
function savePrivateKeyToFs(Server $server)
{
if (data_get($server, 'privateKey.private_key') === null) {
throw new \Exception("Server {$server->name} does not have a private key");
@@ -70,7 +70,7 @@ function generateSshCommand(Server $server, string $command, bool $isMux = true)
{
$user = $server->user;
$port = $server->port;
$privateKeyLocation = addPrivateKeyToSshAgent($server);
$privateKeyLocation = savePrivateKeyToFs($server);
$timeout = config('constants.ssh.command_timeout');
$connectionTimeout = config('constants.ssh.connection_timeout');
$serverInterval = config('constants.ssh.server_interval');