How to set up a spare Mac for Claude Code to control remotely
Key Takeaways
Claude Code Remote Control Explained in 5 Minutes (for Beginners)
- Running Claude Code with full permissions on a dedicated spare Mac isolates security risks from your main machine
- The setup enables remote control via SSH from any device, including the Claude mobile app
- Unlike containers, a spare Mac provides access to GUI applications like Unity that Claude can control visually
Developer YK Dojo has published a detailed guide for turning a spare Mac into a dedicated machine that Claude Code can control autonomously. The setup addresses a real problem: Anthropic's Claude Code agent is powerful, but running it with the --dangerously-skip-permissions flag on your primary computer carries risk. A separate machine with nothing important to lose changes that equation.
Why a spare Mac instead of a container?
YK Dojo built a containerized environment for Claude Code previously, but found limitations that pushed him toward dedicated hardware. Containers still run on your main machine, meaning network traffic and system resources remain shared. More importantly, containers cannot run macOS-only applications. If you want Claude to operate Unity for game development, or any other GUI app through Anthropic's computer use feature (clicking, dragging, typing), a container won't cut it.
The spare Mac approach also lets you talk to Claude Code from the official Claude mobile app. YK notes he often prefers Claude Code over standard Claude on mobile because it's "often more capable." The setup works with a Claude Pro subscription ($20/month), which some founders already have.
The core setup steps
The guide recommends starting fresh. If your spare Mac has any data you don't want the agent accessing, wipe it first. Claude Code with full permissions can reach anything on the machine.
After that, the configuration involves four main steps:
- Enable SSH on the target Mac (sudo systemsetup -setremotelogin on)
- Grant passwordless sudo so the agent can run admin tasks without prompts
- Set up hostname resolution so your main machine can reliably reach the spare
- Install your SSH key for password-free connections
The passwordless sudo step is where most of the security tradeoff happens. You're creating a rule that lets the user account run any command without authentication. On a production machine, this would be reckless. On a wiped spare Mac with nothing sensitive, it's the whole point.
Using hostname over IP address
YK recommends connecting via hostname (e.g., macbook-pro.local) rather than IP address. The IP can change after reboots or DHCP lease renewals. The .local hostname stays constant. One gotcha: each Mac on your network needs a unique hostname. If two machines share a name, your connections might route to the wrong one.
To check your spare Mac's hostname, run scutil --get LocalHostName. To change it: sudo scutil --set LocalHostName newmacbook, which makes the address newmacbook.local.
What tasks actually benefit from this setup?
YK mentions two categories: research tasks and development tasks he doesn't want running on his primary machine. The computer use capability is the key differentiator here. Claude Code can now see the screen, move the cursor, click buttons, and type text. That opens up workflows impossible in a terminal-only environment.
For startup founders, think: automated testing that requires visual verification, prototype building in GUI tools, or any repetitive computer work that's hard to script but easy to demonstrate. If you can show Claude what to do by example, computer use lets it repeat the process.
Logicity's Take
This guide fills a gap Anthropic hasn't officially addressed. Claude Code's computer use mode is powerful but risky, and Anthropic's documentation doesn't provide a recommended isolation strategy. YK's spare Mac approach is more accessible than cloud VMs for most developers (no per-hour costs, no latency issues) and more capable than Docker for GUI workflows. The tradeoff is hardware cost, but many developers have old MacBooks sitting in drawers. If you're automating workflows with [Zapier](https://logicity.in/r/zapier) or [Make](https://logicity.in/r/make) today, this setup could handle tasks those tools can't touch, anything requiring visual interaction with desktop software.
Security considerations
Let's be clear about what you're enabling. Passwordless sudo plus the --dangerously-skip-permissions flag means Claude can do anything on that machine without asking. It can install software, modify system files, send network requests, and access any data on the disk. Anthropic named that flag "dangerously" for a reason.
The mitigation strategy is isolation, not restriction. You accept that the spare Mac is fully compromised from a security perspective. You just ensure there's nothing on it worth protecting and that it can't reach sensitive resources on your network.
Remote access from anywhere
Once configured, you can SSH into the spare Mac from your main machine and run Claude Code commands directly. The setup also works with the Claude mobile app, letting you issue tasks from your phone while away from your desk. YK specifically calls out this mobile access as one of the main benefits. Starting a long-running task before a meeting, then checking results after, becomes practical.
Related perspective on how AI agents may replace traditional software interfaces
Frequently Asked Questions
Does this setup require a Claude Pro subscription?
Claude Code works with Claude Pro ($20/month). You can use your existing subscription's usage allocation for tasks on the spare Mac.
Can I use a Mac mini instead of a MacBook?
Yes. The guide applies to any Mac. A Mac mini is actually ideal since it's designed for always-on operation and doesn't tie up a portable machine.
What happens if Claude Code runs a destructive command?
On this setup, it executes. That's the point of passwordless sudo. The safety model is isolation: nothing on the spare Mac should matter if lost or corrupted.
Can Claude Code control apps like Figma or Slack through computer use?
In theory, yes. Computer use lets Claude see the screen and interact with GUI elements. App support depends on whether the app responds to standard macOS input methods.
Is this setup reversible?
Yes. To disable passwordless sudo, delete the /etc/sudoers.d/<user>-nopasswd file. To disable SSH access, run sudo systemsetup -setremotelogin off.
Need Help Implementing This?
Setting up agentic AI workflows requires careful security planning. Contact our team for guidance on isolated environments, automation pipelines, and AI tool integration for your startup.
Source: Hacker News: Best
Manaal Khan
Tech & Innovation Writer
Produced with AI assistance and reviewed by the Logicity editorial team. Learn more in our Editorial Policy.
Related Articles
More in Startups & Innovation
Redwood Materials Layoffs Signal Battery Industry Pivot
Redwood Materials cut 135 jobs (10% of staff) while pivoting toward energy storage, just three months after raising $425M at a $6B+ valuation. For executives watching the battery and EV supply chain, this restructuring reveals where smart money is heading as automotive electrification plans cool down.





