Unable to access Bastion, connectivity issue even after the correct ports are setup

Joel Yang 0 Reputation points
2024-02-09T06:32:39.7233333+00:00

Setup Bastion, however unable to access it due to connectivity issues.

Working fine when remote through SSH and the ports have already been adjusted according to Bastion FAQ.

Next steps, thank you.

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.
242 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 47,591 Reputation points Microsoft Employee
    2024-03-04T12:24:29.1466667+00:00

    Hello @Joel Yang ,

    I understand that you were unable to access Bastion even after setting up the ports correctly. You were able to SSH to your Azure VM directly but were not able to access the VM via Bastion.

    You were getting the following error when trying to SSH to the Azure VM via Bastion: "the network connection to the bastion host appears unstable".

    You didn't have any NSG associated to the Bastion subnet. You set the roles for IAM on the VM, Bastion, NIC correctly and also the NSG associated to the VM had ports 22,3389 allowed to both the public and private IP of the Bastion. You were using a Linux-based VM (not domain joined) that had a public IP but still were unable to SSH into it via Bastion.

    We enabled a one-time free technical support for your subscription, and you created a support request for this issue.

    The support team asked to reset the credentials of the VM and then Bastion to it, but you were still unable to access the VM.

    Then the support team provided the below work arounds:

    Option 1: To enable password authentication.

    • SSH in as root to edit the sshd_config file. Change the line PasswordAuthentication no to PasswordAuthentication yes. After making that change, restart the SSH service.

    https://learn.microsoft.com/en-us/azure/virtual-machines/linux-vm-connect?tabs=Linux

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-password

    Option 2: Deploy new Linux VM with different image.

    • We recommend you deploy a new Linux VM with the different image (not as existing VM's image) and Bastion to it.

    You confirmed that the issue is now resolved.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments