remove PermitRootLogin check as we now use cloudron-support user

This commit is contained in:
Johannes Zellner
2022-08-25 14:25:25 +02:00
parent d4555886f4
commit 563391c2f1

View File

@@ -63,9 +63,6 @@ async function canEnableRemoteSupport(req, res, next) {
const sshdConfig = safe.fs.readFileSync(SSHD_CONFIG_FILE, 'utf8');
if (!sshdConfig) return next(new HttpError(412, `Failed to read file ${SSHD_CONFIG_FILE}`));
// only check for PermitRootLogin if we want to enable remote support
if (req.body.enable && !sshdConfig.split('\n').find(function (line) { return line.search(/^PermitRootLogin.*yes/) !== -1; })) return next(new HttpError(417, `Set "PermitRootLogin yes" in ${SSHD_CONFIG_FILE}`));
next();
}