CIS Microsoft Azure Foundations Benchmark v1.4.0/Networking/86 of 115
6.2Ensure that SSH access is restricted from the internet
Control family: Networking
Control description
Disable SSH access on network security groups from the Internet.
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
SSH open to the internet invites constant password guessing and exploit attempts. Administrators connect through Azure Bastion, a VPN or just-in-time access, so no network security group allows port 22 from anywhere.
Before you start
The same on every cloud, before the steps in the tabs.
- Agree how administrators reach Linux VMs (Azure Bastion, VPN or just-in-time access), and record any exception with its approver.
- Add "no SSH from the internet" to the network change review.
Evidence
- The remote access standard and the exception register
On Azure the tasks remove or narrow inbound rules that allow SSH from the internet in each network security group, and give administrators Azure Bastion instead.
Task 1Close SSH to the internet in each network security group
- Sign in to the Azure portal at portal.azure.com and open Network security groups.
- Select a group, then Settings > Inbound security rules.
- Find rules with Action Allow, destination port 22 (or Any), and source Any, Internet or 0.0.0.0/0.
- Open each rule and either delete it or change Source to IP Addresses with your administrators' ranges only.
- Select Save.
- Check it: the group's inbound rules no longer allow port 22 from the internet; repeat for every group, including those on subnets.
Task 2Give administrators Azure Bastion instead
- Open a virtual machine and select Connect > Bastion.
- If the virtual network has no Bastion, select Deploy Bastion and wait for it to finish (it needs an AzureBastionSubnet).
- Connect to the VM through Bastion in the browser, with no public SSH port open.
- Check it: administrators reach their VMs through Bastion, and Defender for Cloud no longer flags management ports open to the internet.
Evidence
- The inbound rules of each network security group, with no SSH rule open to the internet
- The Bastion host and its connection history
Not applicable. This benchmark covers Azure only.
Not applicable. This benchmark covers Azure only.
Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.