remove PermitRootLogin check as we now use cloudron-support user
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user