diff --git a/src/routes/support.js b/src/routes/support.js index bd8da8461..8e0f527d9 100644 --- a/src/routes/support.js +++ b/src/routes/support.js @@ -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(); }