Prechádzať zdrojové kódy

fixed ssh root login on Install Route

Piotr Labudda 9 rokov pred
rodič
commit
ecb16b4d25
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      SE/se-lib/Route/Install.php

+ 2 - 2
SE/se-lib/Route/Install.php

@@ -269,7 +269,7 @@ jQuery(document).ready(function () {
 				$phpFiles[] = $phpFilePath;
 			}
 
-			DBG::_(true, true, 'phpFiles', $phpFiles);
+			DBG::_(true, true, 'phpFiles', $phpFiles, __CLASS__, __FUNCTION__, __LINE__);
 			if (empty($phpFiles)) throw new Exception("No php files to encode");
 		}
 
@@ -584,7 +584,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} server@{$appLicenceInfo->mainServer} 'ls -1'";
+		$cmd = "ssh {$sshPort} {$appLicenceInfo->rootLogin}@{$appLicenceInfo->mainServer} 'ls -1'";
 		V::exec($cmd, $out, $ret);
 		DBG::_(true, true, "cmd: {$cmd} (return: {$ret})", $out, __CLASS__, __FUNCTION__, __LINE__);
 		if (0 !== $ret) throw new Exception("Cannot run remote command using rsa key! #{$ret}");