0
0
Azurecloud~20 mins

SSH and RDP access in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SSH and RDP Access Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you try to SSH into an Azure VM without opening port 22?

You have deployed a Linux VM in Azure. You try to connect using SSH but the connection times out. What is the most likely reason?

AThe VM's public IP address is not assigned.
BThe Network Security Group (NSG) does not allow inbound traffic on port 22.
CAzure blocks all SSH traffic by default for security reasons.
DThe VM's operating system does not support SSH connections by default.
Attempts:
2 left
💡 Hint

Check the firewall rules controlling network traffic to the VM.

Configuration
intermediate
2:00remaining
Which Azure CLI command opens RDP access on port 3389 for a Windows VM?

You want to allow RDP access to your Windows VM by opening port 3389 in the NSG. Which command correctly adds this rule?

Aaz vm open-port --name MyVM --resource-group MyGroup --port 22
Baz network nsg rule create --nsg-name MyNSG --resource-group MyGroup --name AllowSSH --protocol Tcp --direction Inbound --priority 1000 --source-address-prefixes '*' --source-port-ranges '*' --destination-port-ranges 3389 --access Allow
Caz network nsg rule create --nsg-name MyNSG --resource-group MyGroup --name AllowRDP --protocol Tcp --direction Inbound --priority 1000 --source-address-prefixes '*' --source-port-ranges '*' --destination-port-ranges 3389 --access Allow
Daz vm open-port --name MyVM --resource-group MyGroup --port 80
Attempts:
2 left
💡 Hint

Look for the command that creates an NSG rule for port 3389 with the correct name and protocol.

Architecture
advanced
2:30remaining
Best practice for securing SSH access to Azure VMs

You want to secure SSH access to your Linux VMs in Azure. Which architecture approach is best to reduce exposure to the internet?

AUse a jump box VM with a public IP and allow SSH only from trusted IPs to the jump box, then SSH from jump box to other VMs on private network.
BDisable SSH and use only Azure portal serial console for access.
CAllow SSH from any IP address by opening port 22 in the NSG.
DOpen port 22 to the internet but require complex passwords on the VM.
Attempts:
2 left
💡 Hint

Think about minimizing direct internet exposure of your VMs.

security
advanced
2:00remaining
What is the effect of enabling Azure Bastion for RDP and SSH access?

You enable Azure Bastion on your virtual network. What is the main effect on how you access your VMs?

AYou must open port 3389 and 22 on NSGs to use Azure Bastion.
BAzure Bastion disables all RDP and SSH access to VMs.
CAzure Bastion requires installing additional software on your local machine.
DYou can connect to VMs via RDP and SSH directly through the Azure portal without exposing public IPs or opening ports.
Attempts:
2 left
💡 Hint

Consider how Azure Bastion changes the connection method to VMs.

Best Practice
expert
3:00remaining
How to enforce multi-factor authentication (MFA) for SSH access to Azure Linux VMs?

You want to require MFA when users SSH into your Azure Linux VMs. Which approach achieves this?

AConfigure Azure Active Directory (Azure AD) login for Linux VMs and enable Conditional Access policies requiring MFA.
BOpen port 22 and require users to enter a second password during SSH login.
CUse SSH keys only and disable password authentication.
DEnable MFA on the VM's local user accounts.
Attempts:
2 left
💡 Hint

Think about integrating Azure identity services with VM login.