Steven Carlton
Steven Carlton

Reputation: 444

Cannot RDP into Azure VM - User/Group Issue

Frustrated with myself as I seem to have locked myself out of my Azure VM via RDP or FTP. When I try to login to the server via RDP I get an error message "The credentials are correct, but the host cannot log you on for another reason. "

I don't know how I caused this but I believe it has to do with users or groups somehow. I was struggling with setting up a user to be allowed FTP access to a specific folder, created a new group for the user and then set permission to the folder. Got him all setup but managed to lock myself out in the process.

Any idea of what to try before I call Azure support and pay their fee? (if they can even help)

Thanks, been a long day...

Upvotes: 0

Views: 1330

Answers (3)

azec.me
azec.me

Reputation: 5078

If you are using Azure Resource Management, instead of Azure Service Management, you will need different set of commands:

See available machines for subscription (assuming you have logged in already):

Get-AzureRMVM | select Name, ResourceGroupName

Select machine you need to work on:

$vm = Get-AzureRmVM -Name '<VM_NAME>' -ResourceGroupName '<RG_NAME>'

Create new credentials:

$cred=Get-Credential

Set credentials on VM:

Set-AzureRmVMAccessExtension -VMName '<VM_NAME>' -ResourceGroupName '<RG_NAME>' -UserName $cred.GetNetworkCredential().Username -Password $cred.GetNetworkCredential().Password -Name '<EX_NAME>'

Update VM:

Update-AzureRmVM -VM $vm

Upvotes: 0

Bruno Faria
Bruno Faria

Reputation: 5272

Try the tool first. It's really a life saver and very simple to use.

Microsoft Azure IaaS (Windows) diagnostics package

https://home.diagnostics.support.microsoft.com/SelfHelp?knowledgebaseArticleFilter=2976864

Additional info on this blog post:

Troubleshoot Remote Desktop connections to a Windows-based Azure Virtual Machine

http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-troubleshoot-remote-desktop-connections/

Upvotes: 0

user189198
user189198

Reputation:

The VM Access extension is designed to help you access an Azure virtual machine that you've been locked out of. You can use the Azure PowerShell module to configure the extension on your Azure VM.

Get-AzureVM -ServiceName MyCloudService -Name MyVMName | Set-AzureVMAccessExtension -UserName MyUserName -Password MyPassw0rd! | Update-AzureVM;

Upvotes: 3

Related Questions