Simplifying Azure Bastion - 3 Connecting to Windows VMs using Azure Bastion@20aman Apr 08, 2021
In the last post, we deployed the Azure Bastion service. In this post, we will look at how to connect to a Windows VM via RDP using the Bastion service.
Connecting to the Windows VM via RDP
To start an RDP connection to a Windows host, navigate to the virtual machine that you want to connect to. Click on the Connect button. In the pop-out option, select the Bastion option. Click on the "Use Bastion" button on the next screen.
In the next screen to "Connect using Azure Bastion", enter the credentials for the VM to which you are trying to connect. Keep the check box for "Open in new window" checked. If you don't select this checkbox then the RDP session will open in another blade to the right. I prefer to open the RDP session in a new window for maximum screen space.
Your VM will open in a new tab. You will be able to perform many actions that you can do via direct RDP (with exception of a few).
Caveats during the connectivity
There are some caveats when connecting via the Bastion service. Here are a few that I have encountered or was able to generate.
The first one is the pop-up blocked alert. When you are trying to connect using the option to open in the new window, then if you have a pop-up blocker enabled and the Azure portal is not whitelisted then you will see the below alert in the portal when trying to connect. The connection will not succeed.
Solution: click on the small icon for blocked pop-up in the address bar of the browser, as shown below, and select to Allow the pop-ups from the Azure portal.
When trying to connect for the first time or trying to connect on a new browser, the Bastion service will request you to allow the Text and Image related clipboard access. I highly recommend allowing this. If you opt to not allow this access then later, you won't be able to share any clipboard with the session.
If for any reason the connection is interrupted then you will see a dialog saying "Disconnected". You will have the option to Reconnect or exit by clicking on the Close button.
Connection Error may come e.g. when restarting the VM. It will automatically attempt to reconnect in few seconds. You can also force reconnect by clicking on the "Reconnect" button.
As you can see that using the Bastion service to connect to the Windows VMs is a very easy and straightforward process. In the next post, we will look at how to connect to a Linux VM via SSH using the Bastion service.