Chi tiết các phương pháp Remote Access vào VM Azure 1. Remote Access vào VM Azure a) SSH/RDP (Traditional) # SSH vào Linux VM ssh -i ~/.ssh/mykey.pem azureuser@vm-public-ip # RDP vào Windows VM (sử dụng Remote Desktop Client) mstsc /v:vm-public-ip b) Azure Bastion (Recommended) bash # Tạo Azure Bastion az network bastion create \ --resource-group myRG \ --name myBastion \ --public-ip-address myBastionIP \ --vnet-name myVNet \ --location eastus c) VPN Gateway bash # Tạo Point-to-Site VPN az network vnet-gateway create \ --resource-group myRG \ --name myVPNGW \ --vnet myVNet \ --public-ip-addresses myGWIP \ --gateway-type Vpn \ --vpn-type RouteBased \ --sku VpnGw1 \ --vpn-gateway-generation Generation1 d) Run Command Extension bash # Chạy command từ xa mà không cần SSH az vm run-command invoke \ --resource-group myRG \ --name myVM \ --command-id RunShellScript \ --scripts "sudo apt update && sudo apt instal...
Remote Access Methods - VM & AKS REMOTE ACCESS VÀO VM SSH / RDP Linux: SSH (Port 22) Windows: RDP (Port 3389) • Public IP required • NSG rules needed • Key-based auth (SSH) • Username/Password (RDP) Security: ⭐⭐⭐ Azure Bastion Browser-based access No public IP needed • HTML5 web client • Azure AD integration • MFA support • Session recording Security: ⭐⭐⭐⭐⭐ VPN Gateway Site-to-Site VPN Point-to-Site VPN • Encrypted tunnel • Private connectivity Security: ⭐⭐⭐⭐ Serial Console Emergency access Boot diagnostics • Azure Portal access • No network required Security: ⭐⭐⭐ Azure CLI / PowerShell Remote • Run Command extension: az vm run-command invoke • PowerShell Direct (Hyper-V scenarios) • Custom Script Extens...