I'm not immediately able to get sshd from rSSH (with the ForceUser modification) to compile and run on macOS High Sierra.
I technically got it to build like this:
- strnvis(ptitle, buf, sizeof(ptitle), - VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL); + strnvis(ptitle, buf, sizeof(ptitle), 0);
...but then it segfaults immediately.
Using the system sshd works fine, but without ForceUser I had to make this change to get things working with the Phacility extensions loaded, since otherwise we try to forward the SSH connection with -l local, and there's no such user account:
diff --git a/src/applications/almanac/util/AlmanacKeys.php b/src/applications/almanac/util/AlmanacKeys.php index 7ed9098e9..7ebb972ac 100644 --- a/src/applications/almanac/util/AlmanacKeys.php +++ b/src/applications/almanac/util/AlmanacKeys.php @@ -62,7 +62,7 @@ final class AlmanacKeys extends Phobject { // 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)) { + if (strlen($username) && false) { return $username; }
A possible fix would be to add magic for "local" here, but that's Phacility-specific logic which would be going into the vanilla upstream.
Another possible "fix" would be to create a user account named "local" so this kind of works by accident, but that seems particularly dumb.