{
  "id": "CB-UBU-NET-020",
  "standard": "ubuntu",
  "version": "0.1.2",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-NET-020",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-NET-020.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-NET-020.yml",
  "profiles_effective": [
    "core",
    "server",
    "server-hardened",
    "desktop",
    "desktop-hardened"
  ],
  "license": "Text CC BY 4.0, code Apache-2.0",
  "attribution": "CIRSEC Baselines, https://baselines.cirsec.org",
  "control": {
    "id": "CB-UBU-NET-020",
    "title": "Show the legal warning banner before SSH authentication",
    "finding": {
      "title": "The SSH server shows no warning before authentication",
      "description": "Without a warning, users connecting over SSH are not told that access is restricted and monitored."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "low"
    },
    "assessment": "automated",
    "tags": [
      "ssh",
      "banner",
      "legal"
    ],
    "applicability": {
      "facts": [
        "openssh-server"
      ]
    },
    "description": "The `Banner` option of the OpenSSH server names a file whose content is sent to the client\nbefore authentication. This control requires it to point to `{{ ssh_banner }}`, the network\nlogin warning whose content is covered by CB-UBU-AUTH-001.\n",
    "rationale": "A warning shown before login states that access is reserved to authorized users and may be\nmonitored. In many jurisdictions it supports legal action against intruders and the use of\nmonitoring records.\n",
    "impact": "The banner is printed by interactive clients before the password or key prompt. Some old\nautomation tools treat any pre-authentication output as an error.\n",
    "setting": {
      "location": "/etc/ssh/sshd_config.d/00-cirsec.conf",
      "default_value": "none",
      "recommended_value": "{{ ssh_banner }}"
    },
    "parameters": [
      {
        "name": "ssh_banner",
        "type": "string",
        "description": "File sent by the SSH server before authentication.",
        "default": "/etc/issue.net"
      }
    ],
    "audit": {
      "manual": "Run `sshd -T | grep '^banner '`. It must print `banner {{ ssh_banner }}`, and that file must\ncontain the organization's warning text.\n",
      "checks": [
        {
          "id": "banner",
          "engine": "sshd-config",
          "description": "Banner.",
          "spec": {
            "key": "banner",
            "value": "{{ ssh_banner }}"
          }
        }
      ]
    },
    "remediation": {
      "manual": "Add `Banner {{ ssh_banner }}` to `/etc/ssh/sshd_config.d/00-cirsec.conf`, check with\n`sshd -t`, then run `systemctl reload ssh`. Write the warning text in the file (see\nCB-UBU-AUTH-001).\n",
      "effects": {
        "restart": "service",
        "services": [
          "ssh"
        ],
        "disruption": "none",
        "lockout_risk": true
      },
      "rollback": "Remove the line and run `systemctl reload ssh`.\n",
      "scripts": [
        {
          "id": "banner",
          "from_check": "banner"
        }
      ]
    },
    "references": [
      {
        "title": "sshd_config(5), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/sshd_config.5.html",
        "publisher": "Canonical",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      }
    ],
    "mappings": [
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AC-8",
        "relation": "partial"
      }
    ],
    "related_controls": [
      {
        "id": "CB-UBU-AUTH-001",
        "type": "related"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "verified": [
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "20.04"
        ],
        "environment": "Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic, BIOS boot",
        "notes": "Banner none reported; generated fix sets /etc/issue.net, shown to clients; SSH by key still accepted after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "22.04"
        ],
        "environment": "Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic, BIOS boot",
        "notes": "Banner none reported; generated fix sets /etc/issue.net, shown to clients; SSH by key still accepted after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "24.04"
        ],
        "environment": "Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic, BIOS boot",
        "notes": "Banner none reported; generated fix sets /etc/issue.net, shown to clients; SSH by key still accepted after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "26.04"
        ],
        "environment": "Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic, BIOS boot",
        "notes": "Banner none reported; generated fix sets /etc/issue.net, shown to clients; SSH by key still accepted after reboot."
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}