siteAliasManager()->getSelf(); if ($self->isRemote()) { // Always pass along ssh keys. if (!$self->has('ssh.options')) { // Don't edit the alias - edit the general config service instead. $this->getConfig()->set('ssh.options', '-o ForwardAgent=yes'); } // Change the SSH user. $input->setOption('remote-user', 'mw2'); } } }