Hello @Gawain Tan
I see you are having trouble accessing your VM through SSH and resetting the password using the Azure CLI is not working for you.
There could be several reasons why you are unable to access your VM through SSH. Let's try to troubleshoot the issue step by step.
- First, make sure that you are using the correct username and password or SSH key to connect to your VM. You can check the username and SSH key by going to the Azure portal and navigating to your VM's "Overview" page. Under "Connect", you can see the SSH command to connect to your VM. Make sure that you are using the correct username and SSH key.
- If you are still unable to connect, try resetting the SSH configuration on your VM. You can do this by using the VMAccess extension. The VMAccess extension can reset the SSH configuration and create a new user with sudo privileges. You can find more information about the VMAccess extension in the provided document.
- If resetting the SSH configuration does not work, you can try accessing your VM through the serial console. The serial console allows you to access your VM's console output and perform troubleshooting steps. You can find more information about accessing your VM through the serial console in the provided document.
- If you are still unable to access your VM, you can try creating a new VM and attaching the disk from the old VM to the new VM. This will allow you to access the data on the disk without having to access the old VM. You can find more information about attaching a disk to a new VM in the provided document. I hope this helps you to troubleshoot the issue.
Please refer to the following document links
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection
If you have any further questions or concerns, please tag me in your comments.