How to change the password and login for Azure VMs?

We know that the default user is azureuser for the Ubuntu on Azure VMs once created, and we used the SSH key to get in. Then we play around with the firewall and disabled the SSH port accidentally. Now, we could not access the VM machine.

Is there any way to change the password/login to VM in Azure?


1 Like

Apparently, in the Azure portal, there is a way to reset the existing user or create a new user with sudo privileges.

Go to your VM. Under the Help section, go to the Reset password link. See the screenshot below.


Hope this helps.


1 Like