I am unable to complete Day 13: SSH into an Azure Virtual Machine. Can you please guide me with the steps required to complete it. I tried multiple times trying to copy the SSH public key to the “authorized file” but I am facing a permission issue.
I think I am able to SSH now. But still this task failed. Please confirm.
Hi @MrSampath
Please refer to the solution here:
## Task: SSH into an Azure Virtual Machine
The Nautilus DevOps team is working on setting up secure SSH access for their virtual machines in Azure. One of the requirements is to add the SSH public key of the root user from the Azure client host (landing host) to the `datacenter-vm` Azure VM's `authorized_keys` file. This ensures secure and password-less SSH access to the VM.
#### Task Details:
- **VM Details:**
- The VM is named `datacenter-vm` and is running in the `West US` region. The default SSH user is `azureuser` — use this user to connect to the VM.
- You need to add the root user's SSH public key from the Azure client host to the `authorized_keys` file of the VM's root user.
- The SSH public key of the root user on the Azure client host is located at `/root/.ssh/id_rsa.pub`.
- **Public Key Addition:**
- Copy the public key located at `/root/.ssh/id_rsa.pub` on the Azure client host to the `authorized_keys` file of the root user on `datacenter-vm`.
- Ensure that the proper permissions for the `.ssh` folder and `authorized_keys` file are set on the VM.
- **Verification:**
- After adding the public key, make sure that you are able to SSH into the `datacenter-vm` VM as the `root` user from the Azure client host without needing a password.
#### Important Notes:
- Ensure that the VM is up and running before attempting to SSH.
- You may need to adjust the firewall or security group rules for the VM to allow SSH access.
---
This file has been truncated. show original
and compare it with your steps.