How to remotely access a Virtual machine deployed on Microsoft Azure

Arpit Maheshwari
3 min readSep 26, 2019

--

Source

Assuming that you already have deployed an instance on Microsoft Azure and the instance is in running state.

If that is not the case, then you might want to take a look at “How to deploy a Virtual machine on Microsoft Azure”.

Now that you a virtual machine deployed, we will enable it to accept a remote desktop connection.

  1. Go to your virtual machine’s “Overview” page. It must look like the screenshot below
Overview page

2. Now you will have to click on the “Networking” menu option and then “Add inbound port rule”.

3. Add the following inbound port rule and save:

Source: Any

Source Port ranges: *

Destination: Any

Destination Port ranges: 3389

Protocol: TCP

Action: Allow

Priority: 300

Name: Port_3389

Inbound port rules

We are doing so because we will have to enable remote incoming connection to this virtual machine for us to access it.

4. The previous setting might take a few moments to come into effect. In the meantime, we will add a Username and a Password for this instance because when we will try to access it remotely, it will ask for a Username and Password.

5. On the left menu bar for your instance, scroll down to the bottom-most part of where you will find an option “Reset password”, click on it then under the “Mode” section, select “Reset password” radio button and enter the Username and Password combination that you would like to keep.

6. You might have to wait for a few minutes for this change to take effect. Once it is done, go back to the “Overview” menu option and click on the “Connect” button that can be found on the center-top of your screen, the might look like:

7. Download the RDP file and save it on your Desktop (you can save it wherever you find it easy to access)

NOTE:- Before downloading the RDP file, make sure that a Public IP address has been allocated to the instance. If not, wait for a few seconds and then download this file.

8. Right-click on this download file and open with your Remote Desktop Client. If you do not have any remote desktop client installed on your system, you might want to download one for your OS.

9. Once you open this file with an RDP client, it will ask you for Username and Password, enter the credentials that you created in Step #5.

10. Congratulations! You are now accessing the VM from your device.

NOTE:- For those who are doing it for educational purposes. Do NOT forget to “Stop” your instance once you are done working on it. Otherwise, very soon all of your free account credits will vanish!

For any particular reason, if you are not able to access your VM using your RDP client, just restart your VM, wait for a few moments and you must be able to access your VM now.

And every time you restart your instance, the instance's IP address will change and you will have to download the RDP file again in order to access your virtual machine.

--

--

Arpit Maheshwari

Software Development Engineer. Worked for several startups & co-founded a startup. Eager to learn. Optimistic. Like watching movies & working on side-projects.