- Public IP: Connect directly from an SSH or RDP client over the Internet when the VM has a public IP.
- Jump box (bastion host): A VM with a public IP placed in a dedicated subnet. You SSH/RDP to the jump box, then from there connect to private VMs in the same virtual network.
- Azure Bastion: A managed Azure service that provides secure, browser-based RDP/SSH access to VMs from the Azure portal. Bastion removes the need to create and manage a jump box VM and avoids exposing RDP/SSH ports to the Internet.

- An Azure subscription, resource group, and virtual network with subnets.
- VMs deployed (Windows and/or Linux) and valid credentials or SSH keys.
- Proper Network Security Group (NSG) rules as required for the chosen approach.
If you want to avoid exposing RDP/SSH to the public internet, plan to use a jump box or Azure Bastion. For production-scale deployments, consider placing Bastion in a hub VNet to serve multiple peered spokes.
Example: SSH from a local terminal to a Linux VM with a public IP:
$rg, $region, $credential, and $VMsize.
AzureBastionSubnet. Create this subnet in the same virtual network that contains your VMs. The subnet should be large enough to accommodate Bastion’s requirements; commonly a /26 or larger is recommended, depending on scale.

- Select the same virtual network (e.g.,
vnet-remoteaccess). - Ensure a subnet named
AzureBastionSubnetexists. - Create or select a Public IP for the Bastion host.
- Choose the SKU (Basic or Standard). Basic is often sufficient for demos and is less costly; choose Standard for larger or production use.

- Open the Virtual Machines list in the Azure portal and select the target VM.
- Click Connect → Bastion.
- Provide username and password (or use SSH key if the VM is configured for SSH keys).
- The portal will open an in-browser SSH session (for Linux) or an RDP session (for Windows).

- Select the Windows VM and click Connect → Bastion.
- Enter valid Windows credentials.
- The Azure portal will open an RDP session in your browser. You’ll see the Windows sign-in screen and then the desktop after authentication.


- Use NSGs to restrict inbound/outbound traffic to required management ports for jump boxes only.
- Prefer SSH key authentication for Linux and Azure AD/managed identities where possible.
- Limit who can create and use Bastion via RBAC and IAM policies.
- Consider hosting Bastion in a centralized hub VNet to reduce deployment and cost overhead across multiple VNets.
Azure Bastion is a managed, secure way to connect to VMs from the browser without exposing RDP/SSH ports. Remember that Bastion requires a dedicated
AzureBastionSubnet and incurs additional cost — consider placing Bastion in a hub VNet to serve multiple peered spokes instead of deploying Bastion in every VNet.- Azure Bastion documentation: https://learn.microsoft.com/azure/bastion
- Virtual network and subnet docs: https://learn.microsoft.com/azure/virtual-network