[Azure] Remote Desktop 遠端桌面
最近需要用到 VPN,因為某些網站有擋台灣的 IP,所以有需要遠端桌面的需求,Microsoft Azure 的 VM 可以開在世界不同的資料中心裡面,本篇紀錄一下實作在 Azure 上開出一台 Ubuntu 的 VM 安裝遠端桌面伺服器,然後利用 Microsoft Remote Desktop 遠端登入進去操作,實作方法參考的是技術文件 Install and configure xrdp to use Remote Desktop with Ubuntu。

上圖是嘗試從台灣連線到法國的 Leroy Merlin 網站,發現台灣的 IP 被封鎖了。
實作步驟:
- 部署一個 VM 在選定的 Region,例如 WestEurope
- 利用 SSH 連線進 Ubuntu
- 安裝 Xrdp 服務
安裝 xfce sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get -y install xfce4 sudo apt install xfce4-session 安裝遠端桌面伺服器 xrdp sudo apt-get -y install xrdp sudo systemctl enable xrdp 新增用戶並且給予認證(Ubuntu 20) sudo adduser xrdp ssl-cert 重啟 xrdp 伺服器 echo xfce4-session >~/.xsession sudo service xrdp restart 設定用戶密碼 sudo passwd azureuser
- 安裝 Microsoft Remote Desktop 應用程式,實現遠端桌面
- 利用 Terminal 安裝 Google Chrome 並且開啟瀏覽器
sudo apt update sudo apt upgrade sudo apt install wget wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome-stable_current_amd64.deb sudo apt-get install -f google-chrome
下圖呈現利用 Microsoft Remote Desktop 在遠端桌面上啟動的 Chrome 瀏覽器可以成功開啟 leroymerlin.fr 的網站。


