From ef629d581658d325a79e2a9c9f6a025de02c454d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 22 Nov 2024 10:43:58 +0100 Subject: [PATCH] fix: always validate ssh key --- app/Helpers/SshMultiplexingHelper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Helpers/SshMultiplexingHelper.php b/app/Helpers/SshMultiplexingHelper.php index 09ddbdde6..8da476b9e 100644 --- a/app/Helpers/SshMultiplexingHelper.php +++ b/app/Helpers/SshMultiplexingHelper.php @@ -30,8 +30,6 @@ class SshMultiplexingHelper $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" '; @@ -118,6 +116,9 @@ class SshMultiplexingHelper $sshConfig = self::serverSshConfiguration($server); $sshKeyLocation = $sshConfig['sshKeyLocation']; + + self::validateSshKey($server->privateKey); + $muxSocket = $sshConfig['muxFilename']; $timeout = config('constants.ssh.command_timeout');