

You can authenticate to Windows machines using either username and password or SSH keys. To start the VM, select Start at the top of the page. On the Overview tab, in the essentials section, verify the status of

To learn more about adding a public IPĪssociate a public IP address to a virtual machine Next to Public IP address, then your VM has a public IP. Overview from the left menu and look at the Networking section. To check if your VM has a public IP address, select "type": "Microsoft.Network/networkSecurityGroups/securityRules", Get-AzNetworkSecurityGroup -Name $MyNSG -ResourceGroupName $myResourceGroup | Add-AzNetworkSecurityRuleConfig -Name allow-SSH -access Allow -Direction Inbound -Priority 1000 -SourceAddressPrefix 208.130.28.4/32 -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange 22 -Protocol TCP | Set-AzNetworkSecurityGroup "type": "Microsoft.Compute/virtualMachines/extensions",Įnsure the appropriate port (by default, TCP 22) is open to allow connectivity to the VM.Īz network nsg rule create -g $myResourceGroup -nsg-name $myNSG -n allow-SSH -priority 1000 -source-address-prefixes 208.130.28.4/32 -destination-port-ranges 22 -protocol TCP Set-AzVMExtension -ResourceGroupName $myResourceGroup -VMName $myVM -Name 'OpenSSH' -Publisher '' -Type 'WindowsOpenSSH' -TypeHandlerVersion '3.0' Use theįollowing examples to deploy the extension.Īz vm extension set -resource-group $myResourceGroup -vm-name $myVM -name WindowsOpenSSH -publisher -version 3.0 Win32 OpenSSH solution, similar to enabling the capability in newer versions of Windows. The extension provides an automated installation of the Script: 'Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0' "script": "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0", "type": "Microsoft.Compute/virtualMachines/runCommands", Invoke-AzVMRunCommand -ResourceGroupName $myResourceGroup -VMName $myVM -CommandId 'RunPowerShellScript' -ScriptString "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" Az vm run-command invoke -g $myResourceGroup -n $myVM -command-id RunPowerShellScript -scripts "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0"
