Unable to Access GUI (RDP) for Kali Linux VM via Azure Bastion

Baby Kempanna 0 Reputation points
2026-04-03T13:08:49.6966667+00:00

Hello Microsoft Support Team, We have deployed a Kali Linux virtual machine (GUI-based image) in Microsoft Azure and are accessing the VM using Azure Bastion. Issue Description

 

The Kali Linux image was created with GUI support enabled When we connect to the VM using Azure Bastion, it only opens a terminal (SSH-like session) We are unable to access the graphical desktop (RDP/GUI mode) through Bastion

 

Expected Behavior We expect to access the full graphical desktop environment (GUI) of Kali Linux, either via:

 

RDP over Azure Bastion, or Another Microsoft-supported secure method without using a public IP

 

Current Behavior

 

Azure Bastion allows connection Only terminal/CLI access is available GUI desktop does not load

 

Environment Details

 

OS: Kali Linux (GUI-based image) VM Type: Azure Virtual Machine Access Method: Azure Bastion User Access: Bastion-based browser connection (no public IP exposed)

 

Assistance Required

 

Confirmation whether Azure Bastion supports GUI/RDP access for Linux VMs, specifically Kali Linux Recommended configuration steps to enable GUI access through Bastion If GUI access is not supported, guidance on:

 

Best secure alternative (RDP, Bastion tunnel, or Bastion Native Client) Required VM, NSG, and OS-level settings

 

 

Please let us know if additional logs or configuration details are required from our side. Thank you for your support.

Azure Bastion
Azure Bastion

An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.


2 answers

Sort by: Most helpful
  1. Ravi Varma Mudduluru 12,535 Reputation points Microsoft External Staff Moderator
    2026-04-03T15:28:21.9066667+00:00

    Hello @Baby Kempanna,

    Thank you reaching out to Microsoft Q&A.

    I can see exactly what's happening. Azure Bastion is defaulting to an SSH terminal session for your Linux VM (that's standard behavior), so you're not seeing the graphical desktop yet. The good news is that full RDP/GUI access is fully supported for Kali Linux VMs without any public IP. You just need xrdp installed on the VM and Bastion set to Standard SKU or higher.

    Here's the quickest way to get it working:

    1. Check/upgrade your Bastion tier In the Azure portal, go to your Bastion resource → Configuration → change the tier to Standard (or Premium) and save.
    2. Install xrdp on your Kali VM (do this via your current Bastion SSH session)
    3. Connect with RDP - Back in the Azure portal, go to your VM → Connect → Bastion. Expand the settings, choose Protocol: RDP, enter your Linux username/password, and click Connect. The full Kali Xfce desktop should now load right in your browser.
    4. RDP to virtual machine using Azure Bastion. you can run the below command it will download the RDP file in your local machine with the help of this you can access the VM directly.
    az network bastion rdp --name MyBastionHost --resource-group MyResourceGroup --target-resource-id vmResourceId
    

    https://learn.microsoft.com/en-us/cli/azure/network/bastion?view=azure-cli-latest#az-network-bastion-rdp

    That’s it no public IP or extra client required.
    The Kali image works great with the Ubuntu instructions in the second link (both are Debian-based).

    See these official Microsoft docs:

    Connect to a Linux VM using RDP – Azure Bastion

    Use xrdp with Linux VMs in Azure

    If the answer is helpful, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".

    Was this answer helpful?

    0 comments No comments

  2. Marcin Policht 99,785 Reputation points MVP Volunteer Moderator
    2026-04-03T13:48:13.4666667+00:00

    Yep - this is supported. Make sure you follow https://learn.microsoft.com/en-us/azure/bastion/bastion-connect-vm-linux-rdp?tabs=portal

    Prerequisites

    Before you begin, verify that you meet the following criteria:

    • An Azure Bastion host deployed in the virtual network where the virtual machine is located, or in a peered virtual network. To set up a Bastion host, see Create a bastion host. The SKU you need depends on your connection method:
      Connection method Minimum SKU Additional configuration
      Azure portal (browser) Standard None
      Azure portal (browser) Standard None
      Azure portal with custom ports Standard None
      IP-based connection Standard IP-based connection enabled
    • xrdp required: To use RDP with a Linux VM, you must have xrdp installed and configured on the Linux VM. To learn how to do this, see Use xrdp with Linux.
    • Azure Bastion uses RDP port 3389 by default. Custom ports require the Standard SKU or higher. To upgrade, see Upgrade a SKU.
    • A Linux virtual machine in the virtual network (or reachable from the virtual network for IP-based connections).
    • Required roles:
      • Reader role on the virtual machine.
      • Reader role on the NIC with the private IP of the virtual machine.
      • Reader role on the Azure Bastion resource.
      • Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network).
    • Ports: You must have the following ports open on your VM:
      • Inbound port: RDP (3389) or
      • Inbound port: Custom value (you then need to specify this custom port when you connect to the VM via Azure Bastion).

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.