Add SSH key to your VM

In the previous step, you generated an SSH key pair. Take the public key and paste it into your VM setup, by copying the entire contents of the You also want to allow your VM to accept inbound SSH traffic by selecting Allow selected ports and choosing SSH from the Select inbound ports dropdown list.

Add SSH public key to VM


A cool feature of using Azure VMs is the ability to enable auto-shutdown (because let's face it, we all forget to turn off our VMs…). If you go to the Management tab, you can set the time you want to shut down the VM daily.

Virtual machine auto-shutdown

Select Review and Create, then Create, and Azure will deploy your VM for you!

Once the deployment is finished (it may take several minutes), go to the new resource view for your virtual machine.

Next, you'll connect to your virtual machine through SSH with Visual Studio Code.

I've added my SSH key and created the VM