diff --git a/src/applications/almanac/util/AlmanacKeys.php b/src/applications/almanac/util/AlmanacKeys.php index 83a4f4021b..7ed9098e97 100644 --- a/src/applications/almanac/util/AlmanacKeys.php +++ b/src/applications/almanac/util/AlmanacKeys.php @@ -1,77 +1,77 @@ getKey($cache_key); if (!$device) { $viewer = PhabricatorUser::getOmnipotentUser(); $device = id(new AlmanacDeviceQuery()) ->setViewer($viewer) ->withNames(array($device_id)) ->executeOne(); if (!$device) { throw new Exception( pht( 'This host has device ID "%s", but there is no corresponding '. 'device record in Almanac.', $device_id)); } $cache->setKey($cache_key, $device); } return $device; } public static function getClusterSSHUser() { // NOTE: When instancing, we currently use the SSH username to figure out // which instance you are connecting to. We can't use the host name because // we have no way to tell which host you think you're reaching: the SSH // protocol does not have a mechanism like a "Host" header. $username = PhabricatorEnv::getEnvConfig('cluster.instance'); if (strlen($username)) { -// return $username; + return $username; } $username = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); if (strlen($username)) { return $username; } return null; } } diff --git a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php index 7ebd95938b..1aab14b57b 100644 --- a/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php +++ b/src/applications/drydock/interface/command/DrydockSSHCommandInterface.php @@ -1,59 +1,59 @@ credential === null) { $credential_phid = $this->getConfig('credentialPHID'); $this->credential = PassphraseSSHKey::loadFromPHID( $credential_phid, PhabricatorUser::getOmnipotentUser()); } return $this->credential; } public function setConnectTimeout($timeout) { $this->connectTimeout = $timeout; return $this; } public function getExecFuture($command) { $credential = $this->loadCredential(); $argv = func_get_args(); $argv = $this->applyWorkingDirectoryToArgv($argv); $full_command = call_user_func_array('csprintf', $argv); $flags = array(); - // $flags[] = '-o'; - // $flags[] = 'LogLevel=quiet'; + $flags[] = '-o'; + $flags[] = 'LogLevel=quiet'; $flags[] = '-o'; $flags[] = 'StrictHostKeyChecking=no'; $flags[] = '-o'; $flags[] = 'UserKnownHostsFile=/dev/null'; $flags[] = '-o'; $flags[] = 'BatchMode=yes'; if ($this->connectTimeout) { $flags[] = '-o'; $flags[] = 'ConnectTimeout='.$this->connectTimeout; } return new ExecFuture( 'ssh %Ls -l %P -p %s -i %P %s -- %s', $flags, $credential->getUsernameEnvelope(), $this->getConfig('port'), $credential->getKeyfileEnvelope(), $this->getConfig('host'), $full_command); } }