Practical Azure Series – How-To Enable SSH On Azure VM


When a new VM is created on Azure, by-default the Protocol TCP on Port 22 is Disabled. This will not let you SSH into the VM either from Azure’s Cloud Shell or external access from a Mac Terminal or Putty.

You may see this:

To use SSH on Cloud Shell or Mac Terminal or Putty, do the following:

  1. Select the VM
  2. Select “Networking”
  3. On the right, select “Add inbound port rule”. This should open a popup
    1. Source: Any (default)
    2. Source port range: * (default)
    3. Destination: Any (default)
    4. Destination port ranges: 22
    5. Protocol: TCP
    6. Action: Allow
    7. Priority: 330 (default)
    8. Name: Enable 22 (can be anything you can identify)
  4. Select “Add

Now try to SSH, and you should be able to.