{"id":5892,"date":"2014-08-25T00:00:00","date_gmt":"2014-08-25T00:00:00","guid":{"rendered":"https:\/\/azure.microsoft.com\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm"},"modified":"2025-09-12T12:41:28","modified_gmt":"2025-09-12T19:41:28","slug":"using-vmaccess-extension-to-reset-login-credentials-for-linux-vm","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/","title":{"rendered":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Have you ever forgotten your Azure VM password or SSH key and lost access? The VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain access to your VM. You can also add a new user with password or SSH key, or delete a user using this extension. This extension targets Linux VMs, for Windows VMs, click here for details. If this is your first time using VM extensions, you might want to check <a href=\"https:\/\/azure.microsoft.com\/blog\/2014\/04\/11\/vm-agent-and-extensions-part-1\/\">here<\/a> for some background information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pre-Requisites<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Microsoft Azure Linux Agent version 2.0.6 or later. Note most Azure VM Linux gallery images included version 2.0.6 above. You can run <strong>waagent -version<\/strong> to confirm the version installed in the VM. If the VM is running a version earlier than 2.0.6 you can follow these <a href=\"https:\/\/github.com\/Azure\/WALinuxAgent\">instructions<\/a> to update it.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">\u00a0<a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/xplat-cli\/\">Cross-Platform CLI<\/a>\u00a0or <a href=\"https:\/\/azure.microsoft.com\/en-us\/downloads\/\">Azure PowerShell<\/a>.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">A new password or SSH key you want to reset or add along with the new user for you<strong>r<\/strong> VM.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Updates in December 2015:<\/strong><br>VMAccess Extension for Linux is now supporting Azure Resource Manager model, for sample Powershell and CLI scripts on running VMAccess Extension for Linux under ARM model, please see the&nbsp;Github&nbsp;release document&nbsp;here <a href=\"https:\/\/github.com\/Azure\/azure-linux-extensions\/blob\/master\/VMAccess\/README.md\">https:\/\/github.com\/Azure\/azure-linux-extensions\/blob\/master\/VMAccess\/README.md<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the VMAccess Extension through Xplat CLI<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please follow <a href=\"https:\/\/azure.microsoft.com\/en-us\/documentation\/articles\/xplat-cli\/\">this Guidance<\/a> to setup the cross-platform cli environment on your machine. Once the xplat-cli is installed, you will be able to use the <strong>azure<\/strong> command from your command-line interface (Bash, Terminal, Command prompt) to access the xplat-cli commands. For example, run \u2018azure vm extension set &#8211;help\u2019 for detailed extension usage. There are 6 scenarios where you might use VMAccess to gain your access to your VM. The following are scenarios and the corresponding sample scripts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"resetting-the-password\">Resetting the password<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong> Create a file named PrivateConf.json with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n\"username\":\"currentusername\",\n\"password\":\"newpassword\",\n\"expiration\":\"2016-01-01\"\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2<\/strong>: Run \u2018azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.* &#8211;private-config-path PrivateConf.json\u2019<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"resetting-the-ssh-key\">Resetting the SSH key<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1<\/strong>: Create a file named PrivateConf.json with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n { \n  \"username\":\"currentusername\", \n  \"ssh_key\":\"contentofsshkey\",   \n   }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2<\/strong>: Run \u2018azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.* \u2013private-config-path PrivateConf.json\u2019<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"resetting-the-password-and-the-ssh-key\">Resetting the password and the SSH key<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong>&nbsp;Create a file named PrivateConf.json with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n\"username\":\"currentusername\",\n\"ssh_key\":\"contentofsshkey\",\n\"password\":\"newpassword\",\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:<\/strong>&nbsp;Run \u2018azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.* \u2013private-config-path PrivateConf.json\u2019<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-a-new-sudo-user-account\">Creating a new sudo user account<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you forget your user name, you can use VMAccess to create a new one with the sudo authority. In this case, your existing user name and credentials will not be modified.&nbsp;To create a new sudo user with password access, use the script in scenario 1; to create a new sudo user with SSH key access, use the script in scenario 2; you can also use scenario 3 to create a new user with both password and key access. Please note that for the \u201cUserName\u201d field, you need to enter a new user name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"resetting-the-ssh-configuration\">Resetting the SSH configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If the SSH configuration is in an undesired state, you might also lose access to the VM. You can use the VMAccess extension to reset the configuration to default. To do so, you just need to set the \u201creset_ssh\u201d key to \u201cTrue\u201d. The extension will restart the SSH server, open the SSH port on your VM, and reset the SSH configuration to default. The user account (name, password or SSH keys) will not be changed. Note: The SSH configuration file that gets reset is located at \/etc\/ssh\/sshd_config.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: <\/strong>Create a file named PrivateConf.json with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n\"reset_ssh\":\"True\",\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:<\/strong>\u00a0Run \u2018azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.* \u2013private-config-path PrivateConf.json\u2019<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"removing-an-existing-user\">Removing an existing user<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to delete a user account without logging into to the VM directly, you can utilize following script:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: <\/strong>Create a file named PrivateConf.json with following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n\"remove_user\":\"usertoberemoveed\",\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2:&nbsp;<\/strong>Run \u2018azure vm extension set vmname VMAccessForLinux Microsoft.OSTCExtensions 1.* \u2013private-config-path PrivateConf.json\u2019&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"use-the-vmaccess-extension-through-powershell\">Use the VMAccess Extension through PowerShell<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are 6 scenarios where you might use VMAccess to gain your access to your VM. The following are scenarios and the corresponding sample PowerShell scripts. Note that you only need to specify different parameters for each scenario, the section after \u201cBegin execution\u201d is the same regardless of the below scenario.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-resetting-the-password\">1. Resetting the password<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$vm = Get-AzureVM -ServiceName 'MyServiceName' -Name 'MyVMName'\n#Enter your current user name and new password\n$UserName = \"MyCurrentUserName\"\n$Password = \"MyNewPassWord\"\n[hashtable]$Param=@{};\n$Param['username'] = $UserName;\n$Param['password'] = $Password;\n$Param['expiration'] = '2016-01-01';\n$PrivateConfig = ConvertTo-Json $Param;\n#Begin execution\n$ExtensionName = 'VMAccessForLinux'\n$Publisher = 'Microsoft.OSTCExtensions'\n$Version = '1.*'\nSet-AzureVMExtension -ExtensionName $ExtensionName -VM $vm -Publisher $Publisher -Version $Version -PrivateConfiguration $PrivateConfig | Update-AzureVM \n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"3-resetting-the-password-and-the-ssh-key\">3. Resetting the password and the SSH key<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#Sample script to reset your password and SSH key\n#Identify the VM\n$vm = Get-AzureVM -ServiceName 'MyServiceName' -Name 'MyVMName'\n#Enter the new password, and cert path of the new SSH public key, with the current user name\n$UserName = \"CurrentName\"\n$Password = \"NewPassword\"\n$cert = Get-Content \"CertPath\"\n$PrivateConfig = '{\"username\":\"' + $UserName + '\", \"password\": \"' + $Password + '\", \"ssh_key\":\"' + $cert + '\"}'\n# Begin execution\n$ExtensionName = 'VMAccessForLinux'\n$Publisher = 'Microsoft.OSTCExtensions'\n$Version = '1.*'\nSet-AzureVMExtension -ExtensionName $ExtensionName -VM $vm -Publisher $Publisher -Version $Version -PrivateConfiguration $PrivateConfig | Update-AzureVM\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"3-resetting-the-password-and-the-ssh-key-1\">4. Creating a new sudo user account<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you forget your user name, you can use VMAccess to create a new one with the sudo authority. In this case, your existing user name and credentials will not be modified.\u00a0To create a new sudo user with password access, use the script in scenario 1; to create a new sudo user with SSH key access, use the script in scenario 2; you can also use scenario 3 to create a new user with both password and key access. Please note for the\u201cUserName\u201d field, you need to enter a new user name.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"5-resetting-the-ssh-configuration\">5. Resetting the SSH configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the SSH configuration is in an undesired state, you might also lose access to the VM. You can use the VMAccess extension to reset the configuration to default. To do so, you just need to set the \u201creset_ssh\u201d key to \u201cTrue\u201d. The extension will restart the SSH server, open the SSH port on your VM, and reset the SSH configuration to default. The user account (name, password or SSH keys) will not be changed.\u00a0Note: The SSH configuration file that gets reset is located at \/etc\/ssh\/sshd_config.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#Sample script to reset the SSH configuration on your VM \n#Identify the VM\n$vm = Get-AzureVM -ServiceName 'MyServiceName' -Name 'MyVMName'\n$PrivateConfig = '{\"reset_ssh\": \"True\"}'\n# Begin execution\n$ExtensionName = 'VMAccessForLinux'\n$Publisher = 'Microsoft.OSTCExtensions'\n$Version = '1.*'\nSet-AzureVMExtension -ExtensionName $ExtensionName -VM $vm -Publisher $Publisher -Version $Version -PrivateConfiguration $PrivateConfig | Update-AzureVM\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"6-removing-an-existing-user\">6. Removing an existing user<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to delete a user account without logging into to the VM directly, you can utilize following script:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#Sample script to delete the a user account \n#Identify the VM\n$vm = Get-AzureVM -ServiceName 'MyServiceName' -Name 'MyVMName'\n#Identify the user account you want to delete\n$UserName = \"SomeUser\"\n$PrivateConfig = '{\"remove_user\": \"' + $UserName + '\"}'\n# Begin execution\n$ExtensionName = 'VMAccessForLinux'\n$Publisher = 'Microsoft.OSTCExtensions'\n$Version = '1.*'\nSet-AzureVMExtension -ExtensionName $ExtensionName -VM $vm -Publisher $Publisher -Version $Version -PrivateConfiguration $PrivateConfig | Update-AzureVM\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"query-the-results\">Query the results<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The status of the VMAccess extension could be retrieved using the xplat command \u2018azure vm extension get\u2019 or&nbsp;PowerShell cmdlet Get-AzureVM, Get-Deployment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"access-the-vm-after-resetting\">Access the VM after resetting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After the VMAccess Extension completes, you can log on to the instance using the new account name, password or SSH key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"additional-notes\">Additional Notes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you only want to reset the password or SSH key for the existing user account, you need to make sure the user name you entered matches the original user name. If you enter a name that is different from your original name, the VMAccess extension will treat this as a \u201cCreating a new user\u201d scenario, and will create a new user account with the specified password or key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"known-issue\">Known issue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you run the PowerShell command \u201cSet-AzureVMExtension\u201d on a Linux VM, you may hit the following error: &#8220;Provision Guest Agent must be enabled on the VM object before setting IaaS VM Access Extension&#8221;. Note that this issue will not occur on the <a href=\"https:\/\/portal.azure.com\/\">new portal.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Root Cause:<\/strong> when you create an image via the Azure portal, the value of the guest agent on the VM is not always set to \u201cTrue\u201d. If your VM is created using PowerShell, you will not see this issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resolution:<\/strong> Add the following PowerShell command to set the ProvisionGuestAgent to \u201cTrue\u201d;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$vm = Get-AzureVM -ServiceName 'MyServiceName' -Name 'MyVMName'\n$vm.GetInstance().ProvisionGuestAgent = $true\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1467],"tags":[],"audience":[3055,3053,3056],"content-type":[1511],"product":[1566],"tech-community":[],"topic":[],"coauthors":[1147],"class_list":["post-5892","post","type-post","status-publish","format-standard","hentry","category-compute","audience-developers","audience-it-decision-makers","audience-it-implementors","content-type-best-practices","product-linux-virtual-machines","review-flag-1680286580-543","review-flag-2567","review-flag-1680286581-295","review-flag-1680286581-364","review-flag-1680286584-658","review-flag-1-1680286581-825","review-flag-2-1680286581-601","review-flag-3-1680286581-173","review-flag-4-1680286581-250","review-flag-5-1680286581-950","review-flag-6-1680286581-909","review-flag-alway-1680286580-106","review-flag-click-1680286584-659","review-flag-new-1680286579-546","review-flag-vm-1680286585-143"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-25T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-12T19:41:28+00:00\" \/>\n<meta name=\"author\" content=\"Ning Kuang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ning Kuang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/ning-kuang\/\",\"@type\":\"Person\",\"@name\":\"Ning Kuang\"}],\"headline\":\"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM\",\"datePublished\":\"2014-08-25T00:00:00+00:00\",\"dateModified\":\"2025-09-12T19:41:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\"},\"wordCount\":1163,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"articleSection\":[\"Compute\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\",\"name\":\"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"datePublished\":\"2014-08-25T00:00:00+00:00\",\"dateModified\":\"2025-09-12T19:41:28+00:00\",\"description\":\"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compute\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog","description":"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/","og_locale":"en_US","og_type":"article","og_title":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog","og_description":"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2014-08-25T00:00:00+00:00","article_modified_time":"2025-09-12T19:41:28+00:00","author":"Ning Kuang","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Ning Kuang","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/ning-kuang\/","@type":"Person","@name":"Ning Kuang"}],"headline":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM","datePublished":"2014-08-25T00:00:00+00:00","dateModified":"2025-09-12T19:41:28+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/"},"wordCount":1163,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"articleSection":["Compute"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/","name":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"datePublished":"2014-08-25T00:00:00+00:00","dateModified":"2025-09-12T19:41:28+00:00","description":"VMAccess extension enables you to reset the password, SSH key, or the SSH configurations, so you can regain the access","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/using-vmaccess-extension-to-reset-login-credentials-for-linux-vm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Compute","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/"},{"@type":"ListItem","position":3,"name":"Using VMAccess Extension to Reset Login Credentials, Add New User and Add SSH Key for Linux VM"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/5892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=5892"}],"version-history":[{"count":1,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/5892\/revisions"}],"predecessor-version":[{"id":46199,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/5892\/revisions\/46199"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=5892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=5892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=5892"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=5892"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=5892"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=5892"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=5892"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=5892"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=5892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}