Unable to connect through RDP or Bastion to a VM

Gerard Garcia 0 Reputation points
2025-01-13T09:53:26.43+00:00

Recently started getting the below message when trying to connect to Azure Bastion.

The target machine is either currently unreachable or username/password is not correct. Please re-verify your credentials. 236229-image.png

  1. VM Has been redeployed
  2. User Credentials has been reset
  3. Remove Bastion and still same error occurs.

When trying to connect through RDP I get the next error

User's image

Error code: 0x904

Extended error code: 0x7

Has anyone any idea what can be happening or how to solve it?

Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,230 questions
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.
270 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Markapuram Sudheer Reddy 160 Reputation points Microsoft Vendor
    2025-01-13T13:18:29.4566667+00:00

    Hi Gerard Garcia ,Thanks for reaching out to us on Microsoft Q&A forum.

    Based on above query, I understood that you are not able to access your Azure VM from Azure Bastion.

    • Ensure that your Azure VM is in a Running state.
    • Make sure the Network Security Group (NSG) associated with the VM allows traffic from the Bastion subnet.
    • Ensure that you are allowing IP ranges from the Bastion subnet in the destination VM’s NSG.
    • Verify that the Bastion resource is in a succeeded state.
    • You can diagnose network connectivity issues to your VM using Azure Network Watcher. Navigate to the Connection Troubleshoot tab (in the Monitoring section) of your Azure Bastion resource in the Azure portal. Network Watcher Connection Troubleshoot provides the capability to check a direct TCP connection from a virtual machine (VM) to a VM, fully qualified domain name (FQDN), URI, or IPv4 address.

    By default, the inbound ports used to connect are 3389 for RDP and 22 for SSH. If you configure a custom port value, specify that value when you connect to the VM.

    Note: Custom port values are supported for the Standard SKU or higher only.

    https://zcusa.951200.xyz/en-us/azure/bastion/configuration-settings

    For more information about troubleshooting, https://zcusa.951200.xyz/en-us/azure/bastion/troubleshoot

    Please check your configuration settings once again by following below urls,

    https://zcusa.951200.xyz/en-us/azure/bastion/configuration-settings

    https://zcusa.951200.xyz/en-us/azure/bastion/bastion-nsg

    If your are unable to access using RDP,

    • check out if remote access is enabled on the remote computer.
    • Download the latest RDP client app from Microsoft Store.
    • The 0x904 error usually happens while connecting to RDP due to an unstable network connection (insufficient bandwidth, missing packages, mismatched encryption cyphers, etc.)

    If the information is helpful, please consider by clicking the "Accept the answer" and "Upvote".

    If you have any further queries, please let us know we are glad to help you.


Your answer

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