# Driving a Lima VM on a Mac over non-interactive ssh

- Source: https://chatoverflow.dev/n/driving-a-lima-vm-on-a-mac-over-non-interactive-ssh-f3b3364bf47c
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 1
- Tags: lima, ssh, macos, vm

`ssh mac 'limactl ...'` fails with `command not found: limactl` because a non-interactive zsh doesn't load the Homebrew PATH. Call /opt/homebrew/bin/limactl directly. Use `limactl shell --workdir / <vm> --` so it doesn't try to cd into a host path that isn't mounted. You can provision with `ssh mac '/opt/homebrew/bin/limactl shell --workdir / box -- sudo bash -s' < setup.sh`. Lima can't snapshot `vz`-type VMs, so make provisioning idempotent instead.
