VS Code and Cursor on a cloud Mac with Remote-SSH
Open a project on a cloud Mac with Xcode in VS Code or Cursor: nomac ssh-config names the Mac in your SSH config, the project stays on a 50 GB drive between sessions, and limits cap what a session costs.
· 6 min read
Need a Mac for this? NoMac gives your agent full macOS with Xcode for $0.80 an hour, billed by the minute. Start now →
Remote-SSH opens a folder on another machine in your editor. The window stays on your computer, while the files, the terminal and most extensions run on the remote machine. Point it at a Mac and the integrated terminal runs xcodebuild, simctl and swift from a Windows or Linux desktop.
A cloud Mac that is created for each session has one problem here: its address changes every time. NoMac's CLI 0.12 solves it with nomac ssh-config, which writes a host called nomac into your SSH config. Every later nomac start from the same project folder points that name at the new Mac, so the editor always connects to nomac.
What you end up with: VS Code or Cursor connected to a macOS VM with Xcode and the iOS Simulator, your project open from the account's drive, and a terminal on the Mac. The Mac costs $0.80 an hour while it runs, billed by the minute.
What you need
- ·VS Code with Microsoft's Remote - SSH extension, or Cursor.
- ·Node 20 or newer and an OpenSSH client on your computer. On Windows, read the Windows section below first.
- ·NoMac credit: $10 buys 12.5 hours and never expires. No Apple Developer account is needed to start a Mac or run unsigned builds.
Step 1: install the CLI and log in
npm install -g @nomac/cli nomac login
Login prints a URL and a short code to approve in your browser. Install the CLI with npm rather than running it through npx: the SSH entry runs the installed CLI to open each connection. nomac --version should print 0.12.0 or newer.
Step 2: start a Mac from the project folder
cd ~/code/MyApp nomac start --max-duration 28800 --max-cost 7 nomac sync .
start waits until the Mac is ready, usually about a minute. The two limits make the session a working day: eight hours at most, and at most $7 of credit (eight hours cost $6.40). Without them a session stops after two hours or $5.
sync uploads the folder to ~/drive/src/MyApp on your account's drive. It skips node_modules, Pods, DerivedData, build folders and .git.
Step 3: name the Mac in your SSH config
nomac ssh-config
This writes a Host nomac entry to ~/.nomac/ssh_config, adds an Include line for that file at the top of ~/.ssh/config, and prints the project's path on the Mac, such as /Users/agent/drive/src/MyApp. Check it from a terminal:
ssh nomac 'xcodebuild -version'
The entry holds this session's key and the Mac's verified host key, and connects through the CLI over HTTPS on port 443. There is no port to open and no host key to accept. --alias NAME picks another name, and --print shows the entry without writing it.
Step 4: connect the editor
VS Code
Install the Remote - SSH extension, run Remote-SSH: Connect to Host... from the Command Palette and choose nomac. If VS Code asks for the platform, choose macOS. The first connection installs the VS Code Server on the Mac. Then use File, Open Folder and enter the path ssh-config printed.
Cursor
Cursor connects the same way: Remote-SSH, connect to nomac, then open the project folder.
The editor's terminal is now a shell on the Mac, in your project:
xcodebuild -list xcodebuild -scheme MyApp \ -destination 'generic/platform=iOS Simulator' build | xcbeautify xcrun simctl list devices available
Seeing the Simulator
Boot a device by its ID from that list and open the Simulator app. Then run nomac desktop on your computer, in the project folder: it shows the Mac's screen in your browser.
xcrun simctl boot DEVICE_ID open -a Simulator || open -a DeviceHub
The first boot in a session takes about 90 seconds. Xcode 27 replaced Simulator.app with Device Hub, which is why the second command is there.
On Windows
VS Code and Cursor on Windows use Windows' own ssh and the config in the .ssh folder of your user profile, such as C:\Users\you\.ssh\config. Run npm install, nomac login, nomac start and nomac ssh-config in PowerShell, with Node 20 or newer and Windows' OpenSSH client, so the entry lands there. If you run the CLI inside WSL instead, the entry goes into WSL's home folder, which the Windows editor does not read. This setup is tested on macOS and Linux style configs but not yet on Windows; if the connection fails there, write to support@nomac.app.
nomac sync and nomac pull need rsync, which is why NoMac's other Windows guides use WSL. With Remote-SSH you can do without them: clone the repository on the Mac, into ~/drive/src, and work there.
Where your changes live
With Remote-SSH you edit the Mac's copy. Your local folder does not change. Pick one of two ways to keep the work:
- ·Bring files back.
nomac pull SourcescopiesSourcesfrom the project on the Mac to./Sources. Add--overwriteonly when you mean to replace local files that differ. - ·Use Git on the Mac. Sync does not send
.git, so clone the repository into~/drive/srcinstead and commit from the Mac's terminal. Keep a Git token as a NoMac secret (nomac secrets set NAME) and every Mac you start has it.
Avoid editing the same files in both places. When a file changed on the Mac since the last sync, nomac sync leaves it alone, names it and exits with an error, so nothing is overwritten silently.
What stays and what goes
- ·Kept:
~/drive, 50 GB, the same on every Mac of your account. It holds the project and the package and build caches (DerivedData, Swift packages, CocoaPods, npm, Homebrew downloads), so the next session's build only rebuilds what changed. - ·Deleted at stop: the VM and everything outside
~/drive, including the VS Code Server and the extensions installed on the Mac side. The editor installs them again on the next connection. - ·The name: the next
nomac startin the same folder pointsnomacat the new Mac. Connect the editor again; there is still no host key to accept.
Control the cost
The Mac costs $0.80 an hour while it is ready, billed by the minute. An open SSH connection counts as activity, and a connected editor window keeps one open. So the ten-minute idle timeout does not stop a Mac your editor is connected to: it runs until its duration limit or spend cap.
- ·
nomac statusshows the state, the cost so far and when the Mac stops. - ·
nomac stopwhen you are done. It deletes the VM and keeps the drive. - ·Closing the editor ends its connection, and the idle timeout then stops the Mac about ten minutes after the last activity.
nomac stopdoes it at once. - ·
--max-duration(up to 28800 seconds) and--max-costset your own limits at start. A Mac also stops when your credit runs out.
Next steps
The same host name works for any SSH client. To run an agent on the Mac itself, next to the Simulator, see Claude Code on a cloud Mac. To run MobileBuildMCP, which needs a Mac, from Windows or Linux over SSH, see MobileBuildMCP and NoMac. Every command and option is in the CLI reference.