|
|
@@ -793,7 +793,7 @@ chmod 600 ~/.ssh/authorized_keys;
|
|
|
//$cmd = "ssh server@{$appLicenceInfo->mainServer} 'ls -1 .ssh/'";
|
|
|
//$cmd = "ssh -i ~/.ssh/id_rsa server@{$appLicenceInfo->mainServer} 'ls -1'";
|
|
|
$sshPort = (22 != $appLicenceInfo->sshPort)? "-p {$appLicenceInfo->sshPort}" : '';
|
|
|
- $cmd = "ssh {$sshPort} {$appLicenceInfo->rootLogin}@{$appLicenceInfo->mainServer} 'ls -1'";
|
|
|
+ $cmd = "ssh {$sshPort} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no {$appLicenceInfo->rootLogin}@{$appLicenceInfo->mainServer} 'ls -1'";
|
|
|
V::exec("$cmd 2>&1", $out, $ret); // http://php.net/manual/pl/function.exec.php says I saw the exec, system, shell_exec and passthru functions,
|
|
|
//and deduced that the solution was to
|
|
|
//redirect the standard error (stderr) to the standard output (stdout). It's not very clean, since it mixes stderr with stdout, and I only wanted to log the stderr.
|