Skip to content

Commit

Permalink
fix: always validate ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Nov 22, 2024
1 parent b2000f2 commit ef629d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Helpers/SshMultiplexingHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public static function ensureMultiplexedConnection(Server $server): bool
$sshConfig = self::serverSshConfiguration($server);
$muxSocket = $sshConfig['muxFilename'];

self::validateSshKey($server->privateKey);

$checkCommand = "ssh -O check -o ControlPath=$muxSocket ";
if (data_get($server, 'settings.is_cloudflare_tunnel')) {
$checkCommand .= '-o ProxyCommand="cloudflared access ssh --hostname %h" ';
Expand Down Expand Up @@ -118,6 +116,9 @@ public static function generateSshCommand(Server $server, string $command)

$sshConfig = self::serverSshConfiguration($server);
$sshKeyLocation = $sshConfig['sshKeyLocation'];

self::validateSshKey($server->privateKey);

$muxSocket = $sshConfig['muxFilename'];

$timeout = config('constants.ssh.command_timeout');
Expand Down

0 comments on commit ef629d5

Please sign in to comment.