refactor: enhance SSH command handling and auto-detect sudo requirements for Docker commands

This commit is contained in:
infosave2007 committed 2026-04-24 16:15:04 +03:00
1 parent aae920a5c2
commit f04f9dd1cb
4 files changed
+155 -47

No files matched your search

+4 -4
View File
@@ -1118,8 +1118,8 @@ class ServerMonitoring
$sshOptions = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5';
$sshCmd = sprintf(
"sshpass -p '%s' ssh -p %d %s %s@%s %s 2>/dev/null",
$password,
"sshpass -p %s ssh -p %d %s %s@%s %s 2>/dev/null",
escapeshellarg($password),
$port,
$sshOptions,
$username,
@@ -1200,8 +1200,8 @@ class ServerMonitoring
$sshOptions = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5';
$sshCmd = sprintf(
"sshpass -p '%s' ssh -p %d %s %s@%s %s 2>/dev/null",
$password,
"sshpass -p %s ssh -p %d %s %s@%s %s 2>/dev/null",
escapeshellarg($password),
$port,
$sshOptions,
$username,