It is not always possible to find enough time to play with your free-time projects and sometimes it might take more than a week after you created an environment and you started using it. And during this week you could forget something, e.g. password for your SSH connection :)

This is exactly what happened to me this weekend when I returned to my Sitecore development VMs with xDB and SOLR in Azure. Fortunately, I was able to find a solution.


First of all, you would need to install Azure CLI and connect to your subscribtion. Now you should follow the steps below.

Reset Password

Step 1: Create a file named PrivateConf.json with these contents, substituting for the placeholder values.

"username":"your login",
"password":"your password",

Step 2: Run this command, substituting the name of your virtual machine for “vmname”.

> azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.2 --private-config-path PrivateConf.json

Azure more

If you are using a new portal or creates a VM instance from MongoDB template. The method above might not work for you, as it won’t be able to find your virtual machines. To reset the password in this case you would need to switch to Resource Manager module:

> azure config mode arm

Also, format of the command would be slightly different, as you would need to add resource group to configuration:

> azure vm extension set vmgroup vmname VMAccessForLinux Microsoft.OSTCExtensions 1.2 --private-config-path PrivateConf.json

In the previous version of the Azure management console, it was also possible to do this operation online, but it would not should you anything created with the Resource module. On the other hand, you could view your resources in the preview mode of the new portal, but the management of extensions required for this operation is “coming soon”.Azure Extensions - Coming Soon

Follow me on Twitter @true_shoorik & I hope this helps.