• Apr, Sat, 2022

Manage Azure virtual machines

Know the different ways to manage your Azure Virtual Machine (With Photos).

Configure connections to Manage Azure Virtual Machines: RDP , SSH and Bastion.

RDP

  • RDP connection uses TCP port 3389.
  • The first option when you connect to your VM in Azure.
  • Typically, RDP used in labs and on test machines.
  • RDP uses public IP address that hosted on Microsoft and these IP addresses are known to everyone because Microsoft published them every month so people can configure their firewalls to be able to communicate with various resources from Microsoft.
  • Deallocating the virtual machine (stopping it) will change the IP address the next you start it up time unless you are paying extra money for a static IP address. Normal reboot will not get a different IP address.

Manage Azure virtual machines
create vm
rdp connect 1
Download RDP File
delete VM

SSH

  • Uses TCP port 22.
  • Authentication type is going to be SSH public key which then generate a private key.
  • It’s going to be a self-signed certificate.
  • An important prompt will show up to generate a new key pair,Azure does not store the private key. You’re going to have to store that (this message will not appear again).
  • Download that private key (*.pem). 
  • on the VM page itself, select connect from the left side and copy the given command to a clipboard.
  • Open up a command prompt
  • The first time you make a connection you’re going to get a prompt saying that it cannot trust  the host at that IP address that you’re connecting to because it’s a self-signed certificate, type Yes (not Y for Yes).

Create SSH VM
SSH Networking
SSH private key
SSH copy command
SSH cmd
SSH connection

Bastion

  • Because RDP connection is not very secure and your best option is to use Bastion host which still use a public IP address.
  • In VM page, select connect and choose Bastion.
  • For the first time you can choose to configure Bastion automatically by selecting use Bastion button or choose to configure it manually by type bastion in the search . click Create Bastion.
  • The subnet name must be named Azure Bastion Subnet, exactly.

use bastion
create bastion
create bastion 2
create bastion 3
Bastion