Urgent.News

What's breaking now, across thousands of outlets.

Tech

RDP Into a Proxmox VM Without Opening It Up to the Network

I run an Ubuntu Desktop VM on my Proxmox server and wanted to RDP into it without exposing port 3389 to my whole network. What i ended up with: tunnel RDP through SSH . The Idea I already trust my SSH connection to the Proxmox host. So instead of opening RDP up directly, I have SSH secretly carry the RDP traffic for me: [Laptop] --localhost:3389--> [SSH tunnel] --> [Proxmox host] --3389--> [VM]…

One way to access an Ubuntu Desktop virtual machine on a Proxmox server without opening RDP directly to the network is to tunnel RDP traffic through SSH. This method relies on trusting the SSH connection to the Proxmox host. The laptop connects to the SSH tunnel on localhost port 3389, which secretly relays the RDP traffic to the VM.

To set up the VM, install and run xrdp as usual. On the laptop, add a line to the .ssh/config file:

Host proxmox-rdp

HostName proxmox-host-ip

User your-user

LocalForward 3389 VM_IP:3389

This LocalForward line forwards local port 3389 to the VM's port 3389. To connect, follow these steps:

1. Start the VM in Proxmox.

2. Open the tunnel using the command: ssh proxmox-rdp -N. The -N option forwards the port without starting an interactive session.

3. RDP to localhost:3389.

After closing the terminal, the tunnel closes, and RDP access stops. By using SSH to carry RDP traffic, only SSH needs to be exposed, not RDP. The RDP data travels encrypted inside the SSH connection. Be aware that if the VM's IP changes to DHCP after a reboot, update the LocalForward line to use a static IP or configure a DHCP reservation to prevent the tunnel from becoming stale.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Thursday 3 September →