Encountering difficulties accessing your Linux Virtual Machine on Azure? Azure offers streamlined solutions for effortlessly resetting the password.

Problem

Locked out of Azure Virtual Machine and need to reset password.

Solution

Note: For Linux Machines you will need to ensure you install VMAccessForLinux extension (see Troubleshooting section for installing).

1. First, you will want to go to open Azure by visting https://portal.azure.com.

2. Navigate to the Subscription > Settings > Resource Group

3. Find your Azure Virtual Machine (where you want to reset your password for).

4. Scroll down on the left under Help > Reset password

5. Select Reset password and type in the Username of the account you want to change and a new password.

6. Now try logging in with your terminal and use your new username and password.

Troubleshooting

If you are having issues resetting your password due to missing the VMAccessForLinux extension, connect to Azure PowerShell and run the following command (see documentation below for install Az PowerShell):

Code sample by Cloudaen
azure vm extension set "<your VM>" "VMAccessForLinux" "Microsoft.OSTCExtensions" "1.*" -r "Microsoft.OSTCExtensions.VMAccessForLinux"

Summary

Azure offers a diverse range of tools designed to enhance the security of your account while simultaneously simplifying the administration process. The easiest way to reset your VM password is using their User Interface found within Azure.

Related Documentation

Azure: VMAccess Extension (github)

Install and use extensions

VMAccess Extension for Linux (Documentation)

How to install Azure PowerShell

Install Azure PowerShell on Windows