This commit is contained in:
hasani
2025-11-10 13:38:07 +03:00
parent 4ccf1b49f8
commit f3751918b1
+4 -2
View File
@@ -120,8 +120,9 @@ class VpnClient {
$escaped = escapeshellarg($cmd); $escaped = escapeshellarg($cmd);
$sshCmd = sprintf( $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['password'],
$serverData['port'],
$serverData['username'], $serverData['username'],
$serverData['host'], $serverData['host'],
$escaped $escaped
@@ -282,8 +283,9 @@ class VpnClient {
$escapedCommand = escapeshellarg($command); $escapedCommand = escapeshellarg($command);
$sshCommand = sprintf( $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['password'],
$serverData['port'],
$serverData['username'], $serverData['username'],
$serverData['host'], $serverData['host'],
$escapedCommand $escapedCommand