🚨 CMMC Phase One started November 10! Here's everything you need to know →

How to Configure Secure RDP and SSH Session Controls to Satisfy NIST SP 800-171 REV.2 / CMMC 2.0 Level 2 - Control - AC.L2-3.1.12

Practical, step-by-step guidance to configure RDP and SSH session controls (timeouts, lockout, MFA, logging and network restrictions) so small businesses can meet AC.L2-3.1.12 requirements under NIST SP 800-171 Rev.2 / CMMC 2.0 Level 2.

•
April 07, 2026
•
4 min read

Share:

Schedule Your Free Compliance Consultation

Feeling overwhelmed by compliance requirements? Not sure where to start? Get expert guidance tailored to your specific needs in just 15 minutes.

Personalized Compliance Roadmap
Expert Answers to Your Questions
No Obligation, 100% Free

Limited spots available!

This post explains how to configure Remote Desktop Protocol (RDP) and SSH session controls to meet the access/session controls required by NIST SP 800-171 Rev.2 / CMMC 2.0 Level 2 (AC.L2-3.1.12), providing concrete settings, examples and audit evidence steps that a small business can implement today.

What the control expects (practical summary)

The control requires you to implement session management controls that prevent unattended or persistent remote sessions from becoming a risk vector — specifically idle session termination, limiting concurrent/unauthorized sessions, enforcing authentication strength, and auditing session activity. For a small business this translates to: timeout idle RDP/SSH sessions, lock or terminate disconnected sessions, require MFA for remote connections, restrict who can connect from where, use strong crypto, and log session events to prove compliance.

Configuring Secure RDP (Windows) — step-by-step

Group Policy and local settings

Use Group Policy (or local policy on standalone servers) to set session time limits and session behavior. Key GPO paths: Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Session Time Limits. Enable and configure: "Set time limit for active but idle Remote Desktop Services sessions" (e.g., 15 minutes), "Set time limit for disconnected sessions" (e.g., 10 minutes), and "End session when time limits are reached." Also enable "Restrict Remote Desktop Services users to a single Remote Desktop Services session" and "Require user authentication for remote connections by using Network Level Authentication (NLA)". Example PowerShell to enforce NLA in registry: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'UserAuthentication' -Value 1.

Network, gateway and hardening controls

Never expose 3389/Remote Desktop to the Internet without additional controls. Use an RD Gateway, VPN, or a bastion host (Azure Bastion / AWS Session Manager) to mediate connections. Harden RDP by restricting source IPs via Windows Firewall or perimeter firewall: New-NetFirewallRule -DisplayName "Allow RDP from Office" -Direction Inbound -RemoteAddress 203.0.113.0/24 -Action Allow -Protocol TCP -LocalPort 3389. Require TLS 1.2 and use a valid certificate for the RDP listener. Combine with MFA (Duo, Azure AD Conditional Access) for interactive logins — RD Gateway can integrate with MFA providers to enforce second-factor for remote sessions.

Configuring Secure SSH (Linux/BSD) — concrete settings

sshd_config: the minimum secure baseline

Edit /etc/ssh/sshd_config and enforce these example settings: Protocol 2; PermitRootLogin no; PasswordAuthentication no (if using SSH keys); MaxAuthTries 3; LoginGraceTime 30; ClientAliveInterval 300; ClientAliveCountMax 2 (terminates idle sessions after ~10 minutes); MaxSessions 1; AllowGroups sshusers (or use AllowUsers to restrict to admin accounts). For modern crypto, set Ciphers and KexAlgorithms to strong values (for example: Ciphers aes256-gcm@openssh.com,chacha20-poly1305@openssh.com; KexAlgorithms curve25519-sha256@libssh.org). Restart sshd with systemctl restart sshd and verify configuration with sshd -t.

Key management, MFA and intrusion protection

Use SSH key pairs with passphrases stored in a central key management or vault (HashiCorp Vault, AWS Secrets Manager) and disable password auth where possible. Implement two-factor for SSH (Duo, Yubikey with PAM) or use certificate-based authentication (OpenSSH certificates) for short-lived credentials. Protect against brute-force with fail2ban or similar (set maxretry=3, bantime=3600) and monitor /var/log/auth.log or systemd journal. Example fail2ban jail: [sshd] enabled = true; maxretry = 3; bantime = 3600.

Small-business example: practical deployment

Scenario: a 15-person company has two Linux app servers and one Windows server for finance. Practical steps: 1) Deploy an Azure Bastion or VPN so no RDP/SSH ports are open to the Internet. 2) Configure GPO on the Windows server to force RDP timeouts and NLA and require MFA via RD Gateway. 3) On Linux, place a hardened jump host that requires MFA and only allows outbound SSH to internal servers; configure each target server with sshd_config settings above, and require public-key auth. 4) Centralize logs to a lightweight SIEM (open-source: Wazuh/Elastic) and keep 90 days of event logs for audits. 5) Document the configuration change request, GPO exports (Get-GPOReport -Name "RDP Settings" -ReportType XML -Path .\rdp.xml) and the sshd_config versions (git-managed or ticketed change) as audit evidence.

Compliance evidence, tips and best practices

Prepare artifacts an assessor will want: exported GPO reports, screenshots/exports of registry keys or local security policy, sshd_config files with hashes, service restart timestamps, centralized logs showing session disconnect events (Windows Event IDs 4624/4634 with LogonType 10 for RDP; Linux auth logs for SSH logins and disconnects), MFA enrollment reports, and change-control tickets with approval. Best practices: document session timeout rationale, treat jump hosts as high-value assets and rotate keys frequently, enforce least-privilege via AllowUsers/AllowGroups, and automate checks (CIS Benchmarks, monthly crontab to verify sshd_config values) to prevent drift.

Risk of not implementing these controls

Without proper RDP/SSH session controls you increase the risk of persistent unauthorized access (idle sessions hijacked), lateral movement by attackers, credential theft via exposed services, and failure to detect or prove session termination during an incident — all of which can lead to data exfiltration, contract loss with DoD customers, and negative compliance findings. For small businesses that hold Controlled Unclassified Information (CUI), this can mean losing federal contracts or being required to remediate at significant cost.

Summary: enforce idle timeouts and session termination policies, require strong authentication and MFA for remote sessions, restrict network exposure using gateways or bastions, harden protocol configurations (sshd_config and RDP/GPO), monitor and retain session logs, and document everything — these steps will get a small business well-aligned with AC.L2-3.1.12 requirements under NIST SP 800-171 Rev.2 / CMMC 2.0 Level 2 and provide clear evidence for assessors.

 

Quick & Simple

Discover Our Cybersecurity Compliance Solutions:

Whether you need to meet and maintain your compliance requirements, help your clients meet them, or verify supplier compliance we have the expertise and solution for you

 CMMC Level 1 Compliance App

CMMC Level 1 Compliance

Become compliant, provide compliance services, or verify partner compliance with CMMC Level 1 Basic Safeguarding of Covered Contractor Information Systems requirements.
 NIST SP 800-171 & CMMC Level 2 Compliance App

NIST SP 800-171 & CMMC Level 2 Compliance

Become compliant, provide compliance services, or verify partner compliance with NIST SP 800-171 and CMMC Level 2 requirements.
 HIPAA Compliance App

HIPAA Compliance

Become compliant, provide compliance services, or verify partner compliance with HIPAA security rule requirements.
 ISO 27001 Compliance App

ISO 27001 Compliance

Become compliant, provide compliance services, or verify partner compliance with ISO 27001 requirements.
 FAR 52.204-21 Compliance App

FAR 52.204-21 Compliance

Become compliant, provide compliance services, or verify partner compliance with FAR 52.204-21 Basic Safeguarding of Covered Contractor Information Systems requirements.
 
Hello! How can we help today? 😃

Chat with Lakeridge

We typically reply within minutes