0
0
Azurecloud~10 mins

SSH and RDP access in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - SSH and RDP access
User wants to connect
Choose protocol: SSH or RDP
Check VM network settings
Is port open?
Send connection request
Authenticate user
Access granted
User controls VM remotely
User picks SSH or RDP, network ports are checked, then user authenticates to access the VM remotely.
Execution Sample
Azure
az vm open-port --resource-group MyGroup --name MyVM --port 22
ssh azureuser@vm-ip-address
Open SSH port 22 on VM, then connect using SSH client.
Process Table
StepActionCheck/CommandResult
1User decides to connectChoose SSH or RDPSSH chosen
2Check VM networkIs port 22 open?No
3Open portaz vm open-port --resource-group MyGroup --name MyVM --port 22Port 22 opened
4Attempt connectionssh azureuser@vm-ip-addressConnection established
5AuthenticateEnter password or keyAuthentication successful
6Access VMUser controls VM remotelySession active
7End sessionUser disconnectsConnection closed
💡 User disconnects or session ends
Status Tracker
VariableStartAfter Step 2After Step 3After Step 4After Step 5Final
Port 22 openFalseFalseTrueTrueTrueTrue
Connection statusDisconnectedDisconnectedDisconnectedConnectedConnectedDisconnected
Authentication statusNot authenticatedNot authenticatedNot authenticatedNot authenticatedAuthenticatedAuthenticated
Key Moments - 3 Insights
Why can't I connect before opening the port?
Because the VM's network blocks the port (Step 2 shows port 22 is closed), so connection requests are rejected.
What happens if authentication fails?
The connection is refused after Step 5; user cannot access the VM remotely.
Why do we need to open port 22 for SSH?
Port 22 is the standard port for SSH; if it's closed, the VM won't accept SSH connections (Step 3 opens it).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, at which step does the port 22 become open?
AStep 3
BStep 2
CStep 4
DStep 5
💡 Hint
Check the 'Port 22 open' variable in variable_tracker after each step.
At which step does the user successfully authenticate?
AStep 4
BStep 5
CStep 6
DStep 7
💡 Hint
Look at the 'Authentication status' variable in variable_tracker.
If port 22 was not opened, what would happen at Step 4?
AConnection would be established
BAuthentication would succeed
CConnection would be blocked
DUser would control VM remotely
💡 Hint
Refer to Step 2 and Step 3 in execution_table about port status.
Concept Snapshot
SSH and RDP allow remote VM access.
Open required ports (22 for SSH, 3389 for RDP).
Connect using client software.
Authenticate with password or keys.
Then control VM remotely.
Full Transcript
This visual execution shows how a user connects to a virtual machine using SSH or RDP. First, the user chooses the protocol. The VM's network settings are checked to see if the required port is open. If not, the port is opened using Azure CLI commands. Then the user attempts connection. If the port is open, the connection is established. The user authenticates with a password or key. After successful authentication, the user gains remote control of the VM. The session ends when the user disconnects.