Skip to content

feat: re-allow remote SSH access if only key-based login permitted#515

Open
charludo wants to merge 1 commit intoParetoSecurity:mainfrom
charludo:allow-keybased-ssh
Open

feat: re-allow remote SSH access if only key-based login permitted#515
charludo wants to merge 1 commit intoParetoSecurity:mainfrom
charludo:allow-keybased-ssh

Conversation

@charludo
Copy link

  • Add isSSHConfigSecure check which fails if passwordauthentication, permitrootlogin or permitemptypasswords is true. Otherwise, only non-root, key-based login is permitted and the check passes.
  • If an open port 22 is discovered, instead of immediately failing the remote_login check, delegate to isSSHConfigSecure.

Fixes: #467

- Add `isSSHConfigSecure` check which fails if passwordauthentication,
  permitrootlogin or permitemptypasswords is true. Otherwise, only
  non-root, key-based login is permitted and the check passes.
- If an open port 22 is discovered, instead of immediately failing the
  `remote_login` check, delegate to `isSSHConfigSecure`.
@dmurko dmurko requested review from dz0ny and zupo March 19, 2026 13:57
@zupo
Copy link
Member

zupo commented Mar 19, 2026

Generally looks good to me.

@dz0ny
Copy link
Member

dz0ny commented Mar 20, 2026

CIS disallows SSH on desktops, but is allowed on per requirement basis. Mitigation like this would have to be mentioned during audit. SOC requires logging and reporting so even more strict.

CIS Control 4 — Secure Configuration

∙	SSH should be disabled by default on desktops/workstations

CC6 — Logical and Physical Access Controls

∙	Remote access must be authorized, monitored, and logged
∙	Unnecessary open ports/services violate least privilege principles
∙	SSH on desktops could be flagged as a control weakness in an audit.

Above would have to be additional check, essentially we need to be pair with what frameworks recommend for desktop user regarding remote access.

@dz0ny
Copy link
Member

dz0ny commented Mar 20, 2026

Do you need a specific check for your use case during the audit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring back SSH server checks

3 participants