You can complete the exercise by connecting to the Linux VM you just created using ssh and then manually copying/pasting the commands from the script.
Please activate new sandbox and create the VM as instructed in the exercise. After Task 1 finishes, make a note of the publicIpAddress that was assigned to the VM (e.g. 220.127.116.11). Start Task 2, and then when it errors out, follow steps below:
Connect to the newly-created VM using ssh (in cloud shell). You will need to substitute the publicIpAddress you noted above for <VM public ip address> below:
ssh azureuser@<VM public ip address>
Enter yes when you are prompted.
Copy and right-click -- paste the following three commands below in the cloud shell window. Wait for each to complete before pasting in the next command.
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
Performing the steps above should only add a couple of minutes to the process. Continue on in the module. If you have any questions please let me know in a comment.
If this was helpful to you please Accept Answer.