Rent a Mac M4 Mini and Access It via SSH from Linux

3 min read Original article ↗

I needed a Mac to run a Laravel test suite. On my ThinkPad T15g with Docker, the tests took so long I gave up after 2 hours. My client said it takes 5 minutes on their M4 Mac. I decided to rent one and see for myself.

MacStadium: avoid

I started with MacStadium since they're one of the bigger names in this space. Signed up for a bare-metal Mac mini M4 in Dublin at $119/month.

The credentials from their dashboard simply did not work. SSH returned "Permission denied", VNC (via Remmina) returned "Could not authenticate". I tried a hard reboot through their portal. Same result.

I contacted support. They asked if I had tried a reboot. I requested a refund.

rentamac.io: works

After the MacStadium disaster I found rentamac.io. Their approach is different: they use DeskIn for remote desktop access, and recommend Tailscale for SSH.

The catch for Linux users: DeskIn has no Linux client. Their FAQ addresses this and suggests using a smartphone as a bridge to set up SSH access. Annoying, but at least they're upfront about it.

I downloaded DeskIn on my iPhone, created an account (required to use the app), and entered the device ID from my rentamac.io dashboard. Within a minute I was looking at the Mac desktop on my phone.

The touch interface is workable. Two-finger swipe to scroll. It's not great for daily use but fine for initial setup.

Setting up SSH access

On the Mac (controlling it via iPhone), I went to System Settings > General > Sharing and enabled Remote Login. This is the setting that enables SSH on macOS. Then I opened Safari and went to tailscale.com/download. Downloaded and installed Tailscale.

Here's where I got stuck for a few minutes: after installation, Tailscale seemed to hang on "VPN Starting...". Turns out it wasn't stuck. Tailscale on macOS doesn't open a window by default. You need to look for the small icon in the menu bar (top right corner of the screen) and click it. From there you can sign in.

On my Linux machine, I installed Tailscale:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

Then I looked up the Mac's Tailscale IP in the admin console (it's a 100.x.x.x address) and connected:

ssh rentamac@100.x.x.x

Password was rentamac as shown in the dashboard. Done.

The whole process took about 15 minutes.

After the initial setup

Once SSH works, you never need DeskIn or the phone again. I installed Homebrew, PHP, MySQL, and cloned my repo. The Mac is now just another server I can SSH into.

For what it's worth: the test suite that wouldn't finish after 2 hours on my Linux machine completed in 4 minutes 20 seconds on the Mac M4.

Subscribe to my Newsletter

Get the latest updates delivered straight to your inbox

I respect your privacy. Unsubscribe at any time.