From f3751918b1e4ace874cfb40d05e6456a690db79d Mon Sep 17 00:00:00 2001 From: hasani Date: Mon, 10 Nov 2025 13:38:07 +0300 Subject: [PATCH] fix port --- inc/VpnClient.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/VpnClient.php b/inc/VpnClient.php index 1cf7732..29be1b9 100644 --- a/inc/VpnClient.php +++ b/inc/VpnClient.php @@ -120,8 +120,9 @@ class VpnClient { $escaped = escapeshellarg($cmd); $sshCmd = sprintf( - "sshpass -p '%s' ssh -q -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no %s@%s %s 2>&1", + "sshpass -p '%s' ssh -p %d -q -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no %s@%s %s 2>&1", $serverData['password'], + $serverData['port'], $serverData['username'], $serverData['host'], $escaped @@ -282,8 +283,9 @@ class VpnClient { $escapedCommand = escapeshellarg($command); $sshCommand = sprintf( - "sshpass -p '%s' ssh -q -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no %s@%s %s 2>&1", + "sshpass -p '%s' ssh -p %d -q -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PreferredAuthentications=password -o PubkeyAuthentication=no %s@%s %s 2>&1", $serverData['password'], + $serverData['port'], $serverData['username'], $serverData['host'], $escapedCommand