Which password i should input on Azure CLI while installing nginx and while typing sudo apt-get install -y nginx

AMAR 25 Reputation points
2024-04-30T10:56:39.6133333+00:00

User's image

This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,814 questions
{count} vote

Accepted answer
  1. VarunTha 9,655 Reputation points Microsoft Vendor
    2024-04-30T11:19:36.2033333+00:00

    Hi AMAR,

    Thank you for reaching out to us on the Microsoft Q&A forum.

    Sorry for the inconvenience. When you set up an Azure VM, you'll generally be asked to create an administrative user, like 'ubuntu', and provide a password or SSH key for authentication. The 'Sudo' password is for this admin user and is used to authorize admin commands on the server, such as updates, configurations (like installing Nginx), and displaying messages on the home screen. It's crucial to choose a strong password for security purposes.

    1. Start a new sandbox and create a new VM following the Exercise instructions (Step 1: Create a Linux VM and install Nginx).
    2. After completing Step 1, note down the Public IP address assigned to the VM.
    • Before moving into step2, connect to the newly created VM using ssh command in cloud shell. Please run the following command to connect VM:

    ssh azureuser@<VM public ip address>

    User's image

    3. The system gives you to prompt Yes/No. Enter Yes.

     4.Please run the following commands one after another in cloud shell.

    · sudo apt-get update

    · sudo apt-get install -y nginx

    · echo "<html><body><h2>Welcome to Azure! My name is $(hostname).</h2></body></html>" | sudo tee -a /var/www/html/index.html.

    nginx2

    . Exit 

    After completing the step 5, continue your module from step2 of Task 1: Create a Linux virtual machine and install Nginx at module 3 of 14.

    I hope following the steps above resolves your issue.

    If you encounter any future issues, please feel free to contact us, and we will be pleased to assist you further.

    If you have found the answer provided to be helpful, please click on the "Accept Answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.

    Thank you.

    4 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.