If you are using an Apple Mac computer, you can use the macOS terminal to connect to the VM.
To connect through macOS terminal, follow the steps below:
-
Get the .pem file (private key) required to access the VM.
When you create an Azure Linux VM and choose SSH key authentication, Azure generates an SSH public–private key pair for you, and the private key is provided as a PEM file (for example, ubuntu2404.pem) for download. -
Open Terminal and navigate to the location where you downloaded the .pem file.
Code
cd <path of the folder where the pem file is located, for example, Downloads>
- Set the required permissions on the .pem file to make it readable by running the following command:
Code
chmod 600 <Name of the PEM file, for example, my-key.pem>
- Run the command to connect to the VM as a user (to be provided by the infra team) of the VM.
Code
ssh -i my-key.pem <username of the VM user provided by the infra team>@<IP address of the VM>