Check ID:
Provider: Azure
Service:
Severity: HIGH
Categories:
Resource type:
network_ssh_internet_access_restrictedProvider: Azure
Service:
networkSeverity: HIGH
Categories:
internet-exposedResource type:
microsoft.network/networksecuritygroupsWhat this check verifies
Azure NSG inbound rules that allow SSH onTCP 22 from 0.0.0.0/0, Internet, or * are identified, including rules where port ranges include 22 and protocol is TCP or *.
Indicates NSGs exposing SSH to the Internet.
Risk
Public SSH access weakens confidentiality and integrity. Open22 invites brute force and key theft, enabling remote shell control, persistence, and lateral movement. Attackers can pivot into VNets, exfiltrate data, deploy crypto-miners, and impact availability.
Recommendation
Apply least privilege on SSH:- Remove public rules to
TCP 22from0.0.0.0/0 - Allowlist specific admin IPs or management subnets
- Prefer Azure Bastion, JIT access, or VPN/ExpressRoute for admin
- Use key-based auth, disable passwords, and remove unnecessary public IPs
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
az network nsg rule delete —resource-group <RESOURCE_GROUP> —nsg-name <NSG_NAME> —name <RULE_NAME>
References
- https://www.trendmicro.com/cloudoneconformity/knowledge-base/azure/Network/unrestricted-ssh-access.html
- https://learn.microsoft.com/en-us/azure/security/fundamentals/network-best-practices#disable-rdpssh-access-to-azure-virtual-machines
- https://learn.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-network-security#ns-1-establish-network-segmentation-boundaries
Where this check fires
This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable byCheck ID = network_ssh_internet_access_restricted. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks