Creating and Connecting to a Linux VM using a Public Key

Step 1: Create a Linux VM on Azure

Log in to the Azure portal and navigate to the Virtual Machines page

Click “Create a virtual machine” and select “Linux” as the operating system.
Choose a Linux distribution (e.g., Ubuntu) and configure the VM…


This content originally appeared on DEV Community and was authored by Otitoju Mercy

Step 1: Create a Linux VM on Azure

  • Log in to the Azure portal and navigate to the Virtual Machines page

Image description

  • Click "Create a virtual machine" and select "Linux" as the operating system.
  • Choose a Linux distribution (e.g., Ubuntu) and configure the VM settings as desired.

Image description

  • In the "Authentication" section, select "SSH public key" and paste the contents of your public key file (mykey.pub)

Image description.

Step 2: Connect to the Linux VM using SSH

  • Once the VM is created, navigate to the VM's overview page and click "Connect".

Image description

  • Select "SSH" as the connection method.
  • In the SSH connection dialog, enter the username and private key file (mykey) .
  • Click "Connect" to establish the SSH connection.

Image description

Step 3: Verify the Connection

  • Once connected, you should see a terminal prompt for the Linux VM.
  • Run the command using Window PowerShell -a to verify that you are connected to the Linux VM.

Image description

That's it! You have successfully created and connected to a Linux VM using a public key.

Image description

Note: This is just a general outline, and specific steps may vary depending on your Azure subscription and VM configuration.


This content originally appeared on DEV Community and was authored by Otitoju Mercy


Print Share Comment Cite Upload Translate Updates
APA

Otitoju Mercy | Sciencx (2024-06-23T01:39:00+00:00) Creating and Connecting to a Linux VM using a Public Key. Retrieved from https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/

MLA
" » Creating and Connecting to a Linux VM using a Public Key." Otitoju Mercy | Sciencx - Sunday June 23, 2024, https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/
HARVARD
Otitoju Mercy | Sciencx Sunday June 23, 2024 » Creating and Connecting to a Linux VM using a Public Key., viewed ,<https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/>
VANCOUVER
Otitoju Mercy | Sciencx - » Creating and Connecting to a Linux VM using a Public Key. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/
CHICAGO
" » Creating and Connecting to a Linux VM using a Public Key." Otitoju Mercy | Sciencx - Accessed . https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/
IEEE
" » Creating and Connecting to a Linux VM using a Public Key." Otitoju Mercy | Sciencx [Online]. Available: https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/. [Accessed: ]
rf:citation
» Creating and Connecting to a Linux VM using a Public Key | Otitoju Mercy | Sciencx | https://www.scien.cx/2024/06/23/creating-and-connecting-to-a-linux-vm-using-a-public-key/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.