How to SSH into Ubuntu VMs on VMware Workstation Using NAT and Port Forwarding
Connecting to Ubuntu virtual machines from a Windows host can be tricky, especially when using Bridged networking over Wi-Fi adapters like Killer Wi-Fi, which often block VM traffic. In this guide, we show a simple, reliable method using NAT networking and port forwarding, allowing you to SSH into your VM safely and consistently without dealing with network or firewall headaches.
1️⃣ The Problem
I wanted to SSH from my Windows host into a Ubuntu VM on VMware Workstation Pro.
- My first attempt used Bridged networking, like my EC2 setup:
Windows Host ↔ VM via bridged IP (192.168.45.100)
SSH timed out, and ping failed.
Firewall on Windows wasn’t the cause — disabling it changed nothing.
Why Bridged failed:
I'm using a Killer Wi-Fi adapter. Many modern Wi-Fi cards don’t handle Bridged VM traffic reliably.
Even though the VM and host were “on the same subnet” and the VMware Bridge Protocol was enabled, packets from Windows could not reach the VM.
Bottom line: Bridged looked right but couldn’t communicate over Wi-Fi.
2️⃣ First Attempts / Misleads
Tried to SSH using the old Bridged IP (
192.168.45.100) — failed.Tried
ssh 127.0.0.1locally inside the VM — worked, but only from inside the VM itself.Firewall checks confirmed it wasn’t blocking the traffic.
VMware settings (VMnet0, VMnet1) were correct for Bridged / Host-only, but Bridged Wi-Fi still didn’t work.
➡ At this point, I realized Bridged over Wi-Fi is unreliable, and we needed a NAT + port forwarding solution.
3️⃣ Switching to NAT
Windows Host ↔ NAT (VMnet8) ↔ VM
4️⃣ SSH Works via NAT
ssh -p 2222 alok@127.0.0.1
Worked immediately — host connected to VM via NAT + port forwarding.
Ping and firewall issues no longer mattered.
Bridged issues were completely bypassed.
5️⃣ Optional SSH Config Shortcut
- Added to
C:\Users\alok\.ssh\config:
Host vm
HostName 127.0.0.1
User alok
Port 2222
- Now you can simply run:
ssh vm
6️⃣ Key Takeaways
| Step/Problem | How We Solved It |
|---|---|
| Bridged networking fails over Wi-Fi | Use NAT instead; Wi-Fi cards often block Bridged |
| Old IP still assigned to VM | Release old IP (sudo dhclient -r) & request new |
| Host cannot reach VM NAT IP | Set up VMware NAT port forwarding (host:2222 → VM:22) |
| Long SSH commands | Use SSH config shortcut (ssh vm) |
| Reliable Wi-Fi-safe connection | NAT + port forwarding works even on Wi-Fi adapters |
Top comments (0)