Unable to Access VM via SSH After Reboot

Abubakar Ali 0 Reputation points
2025-01-04T14:01:27.8633333+00:00

After rebooting the VM, access via SSH has been lost. What steps can be taken to resolve this issue?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,219 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 115.8K Reputation points MVP
    2025-01-04T14:19:44.4566667+00:00

    Hi @Abubakar Ali ,

    do you get an error message when you try to connect via SSH?

    Maybe this helps to verify SSH : Use the Azure VM Serial Console -> Check that SSH service is running & Check which port SSH is running on

    There are more steps described to troubleshoot.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    0 comments No comments

  2. Mahesh Goud Juvvadi 1,745 Reputation points Microsoft Vendor
    2025-01-06T07:13:30.6233333+00:00

    Hi Abubakar Ali,

    Thank you for reaching out to the Microsoft Q&A platform.
    Based on your question description we understand that you are Unable to Access VM via SSH After Reboot.

    In addition to Andreas, please follow the below troubleshot steps:

    Reset the SSH configuration and reset the credentials for the user.

    Verify the network security group rules permit SSH traffic and role assignment.

    Ensure that a Network Security Group rule exists to permit SSH traffic (by default, TCP port 22).

    If you are using Microsoft Entra ID to manage SSH logins, the user must be assigned the Virtual Machine Administrator Login or Virtual Machine User Login role on the resource group that contains the VM and its associated resources.

    Check the VM resource health and the VM reports as being healthy.

    Restart the VM and Redeploy the VM.

    Please find the below document for your reference:

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

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

    Thank you.

    0 comments No comments

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.