Table of Contents

Azure - SSH troubleshooting

About

When you can't connect to your machine via SSH.

Steps

The documentation

Azure Diagnose Connection Linux Vm

The VM is running ?

Azure Vm Status

Verify if your VM is running by viewing your VM's console screenshot or logs.

Boot diagnostic

To store boot diagnostics for a VM, you need a storage account. These boot diagnostics can help you troubleshoot problems and monitor the status of your VM. The storage account you create is only to store the boot diagnostics data.

Azure Bootdiagnostic Enable

Azure Bootdiagnostic Serial Log

Review effective security group rules

Azure Networking Inbound Rule Ssh

Reset Ssh Configuration

{
    "reset_ssh":"True"
}
az.cmd vm extension set \
  --resource-group resourceGroupName \
  --vm-name vmName \
  --name VMAccessForLinux \
  --publisher Microsoft.OSTCExtensions \
  --version 1.4 \
  --protected-settings reset_sshd.json

Redeploy

Address any Azure host issues by redeploying, which will migrate the VM to a new Azure host

Azure Vm Redeploy

Documentation / Reference