Connect Azure Linux VM using Public and Private Key

Table of Contents

  1. Purpose of document
  2. Create Azure Linux VM
  3. Tools used Puttygen and Putty
  4. Tools Download location
  5. Generate Key Pair (Public and Private) using “puttygen.exe”
    5.1. Public Key
    5.2. Private Key
  6. Build Azure Linux VM and upload Public Key
  7. Connect Azure Linux VM via private key pair and passphrase (Dual authentication)
  8. End of Document

Access Azure Linux VM using Public and Private Key

1. Purpose of document

Purpose of this document is to explain how to access Azure Linux VM securely via Public and Private key pair.

2. Create Azure Linux VM

During the creation of the virtual machine, additional below properties will be reviewed.

  • Resource Group
  • Virtual Network
  • Public IP
  • Network Security Groups
  • Virtual Machine

3. Tools used Puttygen and Putty

  • Puttygen.exe used to generate Key pair.
  • Putty.exe used to connect the Azure Linux VM.

4. Tools Download location

https://www.putty.org/

Download and install

5. Generate Key Pair (Public and Private) using “puttygen.exe”

  • Type : RSA
  • Number of bits : 4096

5.1. Public Key

  • Click on “Generate” and move cursor to generate key

Public Key generated

Save public key/ copy public key. This will be uploaded later in Azure to Access Linux VM.

5.2.  Private Key

Provide passphrase for dual security and save private key.

6. Build Azure Linux VM and upload Public Key

  • Linux Flavor: Ubuntu
  • Linux VM Name: NSIT-LINVM01
  • Resource group: Select correct resource group
  • Location: West US
  • Virtual Network: NSIT-VNET-01 (10.1.0.0/16)
  • Subnet: NSIT-SN01 (10.1.1.0/24)
  • Public IP: NSIT-LINVM01-PIP01
  • Network Security Group: NSIT-NSG01

Login to Azure portal https://portal.azure.com

Create Resource Group

Create resource => Linux VM (Ubuntu)

Paste the public key generated above.

Linux VM created

Linux VM Public IP

7. Connect Azure Linux VM via private key pair and passphrase (Dual authentication).

8. End of Document

Facebook Comments