DEV Community

Cover image for Enabling SSH & RDP on Ubuntu 24.04 VM in Proxmox (Complete Guide)
Chetan Gupta
Chetan Gupta

Posted on

Enabling SSH & RDP on Ubuntu 24.04 VM in Proxmox (Complete Guide)

Running Ubuntu inside Proxmox VE is powerful for homelabs, but accessing it efficiently (SSH + Remote Desktop) is essential.

This guide walks you through:

  • ✅ Enabling SSH access
  • ✅ Enabling Remote Desktop (RDP)
  • ✅ Fixing common issues (like 0x204 error)
  • ✅ Understanding architecture with diagrams
  • ✅ Final checklist

🧠 Architecture Overview

🔷 Block Diagram: Access Flow

+----------------------+
|   Your Laptop/PC     |
| (SSH / RDP Client)   |
+----------+-----------+
           |
           |  Network (LAN / WiFi)
           |
+----------v-----------+
|     Proxmox Host     |
|  (Hypervisor Layer)  |
+----------+-----------+
           |
           | Virtual Network Bridge (vmbr0)
           |
+----------v-----------+
|   Ubuntu 24.04 VM    |
|----------------------|
| SSH Server (port 22) |
| RDP Server (3389)    |
| UFW Firewall         |
| QEMU Guest Agent     |
+----------------------+
Enter fullscreen mode Exit fullscreen mode

⚙️ Part 1: Enable SSH on Ubuntu VM

Step 1: Access VM Console (Proxmox GUI)

  • Login to Proxmox
  • Select VM → Console

Step 2: Install OpenSSH Server

sudo apt update
sudo apt install openssh-server -y
Enter fullscreen mode Exit fullscreen mode

Step 3: Verify SSH Service

sudo systemctl status ssh
Enter fullscreen mode Exit fullscreen mode

If not running:

sudo systemctl enable --now ssh
Enter fullscreen mode Exit fullscreen mode

Step 4: Configure Firewall (UFW)

sudo ufw allow ssh
sudo ufw enable
sudo ufw status
Enter fullscreen mode Exit fullscreen mode

📌 If you see:

firewall not enabled (skipping reload)
Enter fullscreen mode Exit fullscreen mode

→ That’s normal; just enable it.


Step 5: Get VM IP Address

ip addr show
Enter fullscreen mode Exit fullscreen mode

Step 6: Connect from Your PC

ssh username@<vm_ip>
Enter fullscreen mode Exit fullscreen mode

⚠️ Proxmox Firewall Check

If SSH doesn’t work:

  • Go to VM → Firewall
  • Add rule:

    • Direction: IN
    • Port: 22
    • Protocol: TCP

🖥️ Part 2: Enable Remote Desktop (RDP)

You have 2 methods:


🔹 Option 1: GNOME Remote Desktop (Recommended)

Best for Ubuntu 24.04 Desktop.

Steps:

  1. Go to:
   Settings → System → Remote Desktop
Enter fullscreen mode Exit fullscreen mode
  1. Enable:
  • ✅ Remote Desktop
  • ❌ Disable "Remote Login" (important!)
  1. Set:
  • Username & Password

Open Firewall

sudo ufw allow 3389/tcp
Enter fullscreen mode Exit fullscreen mode

🔹 Option 2: xRDP (Alternative)

Use if GNOME RDP fails.

Install:

sudo apt update
sudo apt install xrdp -y
sudo systemctl enable --now xrdp
sudo adduser xrdp ssl-cert
Enter fullscreen mode Exit fullscreen mode

⚠️ Important Rule

👉 NEVER run both at the same time

Check port usage:

sudo ss -tulpn | grep :3389
Enter fullscreen mode Exit fullscreen mode

🔧 Part 3: Enable QEMU Guest Agent (VERY IMPORTANT)

This fixes:

  • Missing IP
  • RDP issues
  • Proxmox communication

Install inside VM:

sudo apt install qemu-guest-agent -y
sudo systemctl enable --now qemu-guest-agent
Enter fullscreen mode Exit fullscreen mode

Enable in Proxmox:

  • VM → Options
  • Enable QEMU Guest Agent
  • FULL shutdown → Start again

🧪 Part 4: Verify Services

Check SSH:

systemctl status ssh
Enter fullscreen mode Exit fullscreen mode

Check RDP:

ss -tulpn | grep 3389
Enter fullscreen mode Exit fullscreen mode

Expected:

gnome-remote-desktop OR xrdp listening
Enter fullscreen mode Exit fullscreen mode

🛠️ Part 5: Fix Common Issues


❌ Error: SSH not found

ssh.service could not be found
Enter fullscreen mode Exit fullscreen mode

✔ Fix:

sudo apt install openssh-server
Enter fullscreen mode Exit fullscreen mode

❌ Error: RDP 0x204

Causes:

  • Firewall blocked
  • Wrong service
  • Wayland issue
  • NLA mismatch

✅ Fix 1: Disable Wayland

sudo nano /etc/gdm3/custom.conf
Enter fullscreen mode Exit fullscreen mode

Uncomment:

WaylandEnable=false
Enter fullscreen mode Exit fullscreen mode

Restart:

sudo systemctl restart gdm3
Enter fullscreen mode Exit fullscreen mode

✅ Fix 2: Disable GNOME Auth (User Mode)

grdctl rdp enable
grdctl rdp set-credentials USERNAME PASSWORD
grdctl rdp disable-view-only
systemctl --user restart gnome-remote-desktop
Enter fullscreen mode Exit fullscreen mode

✅ Fix 3: Client Settings

  • Disable NLA
  • Set Security Layer → RDP
  • Allow insecure connection

✅ Fix 4: Test Connectivity

From your PC:

nc -zv <vm_ip> 3389
Enter fullscreen mode Exit fullscreen mode

or (Windows):

Test-NetConnection <vm_ip> -Port 3389
Enter fullscreen mode Exit fullscreen mode

❌ Issue: Port Conflict

If both installed:

sudo apt remove xrdp -y
Enter fullscreen mode Exit fullscreen mode

❌ Issue: Proxmox Firewall Blocking

Add rule:

  • Port: 3389
  • Protocol: TCP

❌ Issue: No GUI Session

👉 For GNOME RDP:

  • User must be logged in on console

🧾 Final Checklist

✅ SSH Setup

  • [ ] OpenSSH installed
  • [ ] SSH service running
  • [ ] UFW allows port 22
  • [ ] Proxmox firewall allows port 22
  • [ ] SSH connection works

✅ RDP Setup

  • [ ] GNOME Remote Desktop OR xRDP installed
  • [ ] Port 3389 open
  • [ ] No service conflict
  • [ ] Wayland disabled (if needed)
  • [ ] Credentials configured
  • [ ] RDP connection works

✅ Proxmox Integration

  • [ ] QEMU Guest Agent installed
  • [ ] Enabled in Proxmox
  • [ ] IP visible in dashboard

✅ Network Validation

  • [ ] VM reachable via ping
  • [ ] Ports 22 & 3389 reachable
  • [ ] Same subnet / no AP isolation

Pro Tip: Fix RDP Error Code 0x204 (Ubuntu 24.04 on Proxmox)

Error code 0x204 usually means your RDP client cannot reach the Ubuntu VM over the network.
In Proxmox setups, this is commonly caused by:

  • 🔐 Certificate mismatch (GNOME RDP bug in 24.04)
  • 🔥 Proxmox-level firewall blocking port 3389
  • 💤 VM power/suspend issues
  • 🔒 Strict Network Level Authentication (NLA)

🔧 1. Fix GNOME Certificate Bug (Most Overlooked Fix)

Ubuntu 24.04 has a known issue with RDP certificates.

Steps:

  1. Open Microsoft Remote Desktop
  2. Right-click your Ubuntu connection → Export
  3. Open the .rdp file in a text editor
  4. Find:
   use redirection server name:i:0
Enter fullscreen mode Exit fullscreen mode
  1. Change to:
   use redirection server name:i:1
Enter fullscreen mode Exit fullscreen mode
  1. Save and re-import

✅ This bypasses certificate validation issues


🔥 2. Check Proxmox Firewall (Very Common Issue)

Even if Ubuntu allows RDP, Proxmox may still block it.

Steps:

  • Go to: VM → Firewall → Options
  • Check if firewall is Enabled
  • Add rule:
Field Value
Direction IN
Action ACCEPT
Protocol TCP
Destination 3389

💤 3. Disable Ubuntu Power Saving

RDP can fail if the VM “sleeps”.

Fix:

  • Go to: Settings → Power
  • Set:

    • Screen Blank → Never
    • Automatic Suspend → Off

🔒 4. Relax Network Level Authentication (NLA)

Strict authentication can break RDP connection.

Fix on Client (Windows/Mac):

  • Open RDP settings → Advanced
  • Set:

    • “If server authentication fails” → 👉 Connect and don’t warn me

🌐 5. Verify Network Reachability

Make sure your machine can actually reach the VM:

Windows:

Test-NetConnection <vm_ip> -Port 3389
Enter fullscreen mode Exit fullscreen mode

Mac/Linux:

nc -zv <vm_ip> 3389
Enter fullscreen mode Exit fullscreen mode

⚠️ Bonus Insight

👉 If you're connecting to:

  • 192.168.x.x → Local network (should work easily)
  • External IP → You need:

    • Port forwarding
    • Router config
    • Firewall rules

🧠 Quick Diagnosis Flow

RDP Error 0x204
      |
      v
Can you ping VM?
      |
   No ---> Network issue / AP isolation
      |
     Yes
      |
Is port 3389 open?
      |
   No ---> Firewall (Proxmox/UFW)
      |
     Yes
      |
Certificate / NLA / Wayland issue
Enter fullscreen mode Exit fullscreen mode

This Pro Tip section fits perfectly under your Troubleshooting part and makes your blog much more practical.

If you want, I can next:

  • Merge this into your full blog cleanly
  • Or convert everything into a professional Medium/LinkedIn article format

🎯 Key Takeaways

  • SSH requires OpenSSH inside VM (not Proxmox-level)
  • RDP issues in Ubuntu 24.04 are mostly:

    • Wayland
    • Service conflicts
    • Firewall rules
  • QEMU Guest Agent is critical for stability

  • Always validate:

  Network → Firewall → Service → Client
Enter fullscreen mode Exit fullscreen mode

Top comments (0)