Del via


Azure-Linux VM Can't SSH

Hello ,

In This Scenario we will cover some ssh scenarios .

  1. Check if the VM is in Running State on the Portal.
  2. Is there another Port exposed is it availably.(we are trying to isolate if there is a general network issue or just ssh is not responding)
  3. If yes , Try to SSH the VM using it's DIP (Lan IP) from another running VM in the Same VNET. is this working
  4. No , then please go to the Azure Portal and try to reset the SSH . Navigate to the VM blade and scroll down until you find the Reset Password.
  5. Enable boot diagnostics (will generate serial log) and reboot the VM (look under or download to search for error)

first setup for boot diagnostics required a storage account configuration .

 

 

if you see an issue with Ssh configuration continue to the steps below.

  • For RDFE\Azure VM Version 1 blade will appear like below.
  • Option 1 : reset current user password or create a new login (will be granted permission to a shell and login)
  • Option 2 : reset ssh keys in case you have lost your Privet key or it compromised

For our scenario we will go with Option 1

 

 

 

  • For ARM \Azure VM Version 2 blade will appear like below
  • on Arm we have 3 options
  • Option 1 : reset current user password or create a new login (will be granted permission to a shell and login).
  • Option 2 : reset ssh keys in case you have lost your Privet key or it compromised.
  • Option 3 : reset sshd_config (will copy a fresh config)

In this Scenario we will Try Option 3.

if still we weren't able to reach the VM we can work on a console as we use to do on-premise .

Create a Test VM in the same region that support virtualization and Mount the OS VHD( VM) to a hyper-v and investigate using console.

Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (RDFE) Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (ARM) Troubleshoot a Broken Azure VM using Nested Virtualization in Azure (Managed Disk) 

If you get stuck during the Process or this debug is not for You Please raise a ticket to Our Support and an engineer will help you to Mitigate the issue.

 

Thank You,

Tzachi Elkabatz