How I Upgraded My Remote Work Setup: From Mac VPN + NFS + SSH to WireGuard + NFS + Mosh
As an engineer working with embedded Linux and server-side development, remote access to my company's servers is a daily task. For years, I used the built-in VPN on my Mac to connect to our TP-Link router's VPN server, then mounted company file servers via NFS and connected via traditional SSH. It worked—but just barely.
In this post, I want to share how I replaced that aging setup with a much more modern solution: WireGuard + NFS + Mosh. The difference is night and day.
The Old Setup: Mac VPN + NFS + SSH
VPN: The built-in Mac VPN client connected to the office TP-Link router.
NFS: I mounted the server filesystem using NFS over VPN.
SSH: I worked on the server using normal SSH sessions.
Problems:
Slow file transfer speeds. VPN overhead and TCP congestion made working with large files (>2GB) frustrating.
Unstable SSH sessions. If my home network briefly disconnected, my SSH session would die.
High latency. Typing over SSH had noticeable lag.
The New Setup: WireGuard + NFS + Mosh
Step 1: Replacing VPN with WireGuard
WireGuard is a next-generation VPN protocol. It is:
Blazing fast (native kernel support)
Extremely secure (using modern cryptography)
Lightweight and simple to configure
I installed a WireGuard server at the office and configured my Mac client with wg-quick
. The difference in speed was immediately noticeable.
Step 2: Keeping NFS for File Sharing
I kept NFS for mounting company file servers. The big change? Now NFS traffic runs over WireGuard instead of the old VPN tunnel.
Result:
Much faster file transfers
Lower CPU load
Seamless mounting and unmounting
Step 3: Replacing SSH with Mosh
Mosh (mobile shell) is designed for mobile or unreliable networks. Compared to SSH:
Sessions survive network changes or sleep.
Latency feels much lower.
Perfect for long compile jobs and log monitoring.
I no longer have to worry about my session dropping when I switch Wi-Fi networks.
Real-World Improvements
Before (Mac VPN + SSH) | After (WireGuard + Mosh) |
---|---|
~3-5 MB/s file transfers | ~10-15 MB/s file transfers |
SSH session drops frequently | Mosh sessions never drop |
150-200ms terminal latency | ~50ms terminal latency |
I feel like my entire workflow has become smoother and more productive.
Conclusion
If you are still using traditional VPN + SSH for remote access, I highly recommend trying WireGuard + Mosh. Combined with NFS for file access, it has completely transformed my remote development experience.
I now enjoy faster file transfers, stable sessions, and a much more responsive terminal.
Happy remote hacking!
Comments
Post a Comment