Back to Browse

Day 13: SSH into an Azure Virtual Machine

9 views
Apr 25, 2026
20:25

🔐 Day 13: SSH into Azure Virtual Machine | 100 Days of Cloud (Azure) Welcome to Day 13 of the 100 Days of Cloud (Azure) series! In this lab, you’ll learn how to configure password-less SSH access by adding a public key to an Azure Virtual Machine — a must-have skill for secure remote administration. 📌 Lab Objective: Enable SSH login to the VM using key-based authentication without using a password. 🛠️ Task Requirements: VM Name: datacenter-vm Region: westus Use default user: azureuser Add root user's public key to the VM Ensure proper permissions Verify password-less SSH access 💻 Step-by-Step Commands: 🔹 1. Get Public Key (Azure Client) cat /root/.ssh/id_rsa.pub 🔹 2. Find VM Public IP az vm list-ip-addresses -o table 🔹 3. Connect to VM ssh azureuser@VM_PUBLIC_IP 🔹 4. Switch to Root sudo -i 🔹 5. Configure SSH Access mkdir -p /root/.ssh chmod 700 /root/.ssh 🔹 6. Add Public Key vi /root/.ssh/authorized_keys 👉 Paste the copied key 🔹 7. Set Correct Permissions chmod 600 /root/.ssh/authorized_keys 🔹 8. Enable Root Login vi /etc/ssh/sshd_config 👉 Update: PermitRootLogin yes PubkeyAuthentication yes 🔹 9. Restart SSH Service systemctl restart sshd 🔹 10. Verify Access (from Azure client) ssh root@VM_PUBLIC_IP ✅ Expected Outcome: SSH login works without password Public key authentication enabled Root access configured successfully 📚 What You’ll Learn: SSH key-based authentication Managing authorized_keys Linux file permissions for security Azure VM remote access setup 🌟 Why This Lab Matters: Password-less SSH improves both security and automation, making it essential for DevOps workflows and cloud infrastructure management. 🎯 Series: 100 Days of Cloud (Azure) Build real-world cloud skills step by step. 🔔 Follow OtterTech for more hands-on DevOps and Cloud labs! #Azure #SSH #CloudComputing #DevOps #Linux #CyberSecurity #100DaysOfCloud #OtterTech #Day13

Download

0 formats

No download links available.

Day 13: SSH into an Azure Virtual Machine | NatokHD