Free tools · Automation

SSH into a guest by name, with keys you did not have to manage

Turn on Mac-to-guest SSH, pin the guest's host key, and install an ~/.ssh/config include so every terminal on the Mac can reach a machine by its name. 1VMTool generates and holds the machine key; there is nothing to copy around.

macOS 26 or later · Apple silicon · free on both tiers

Step by step

  1. 1vm ssh enable dev --yes

    Turn Mac → guest SSH on for this machine.

  2. 1vm ssh config --install

    Adds the Include line to ~/.ssh/config so `ssh dev` resolves. `--print` shows it, `--uninstall` removes it.

  3. 1vm ssh trust dev

    Pin the guest's host key. `--relearn` re-pins it after the guest is rebuilt.

  4. 1vm exec dev -- node --version

    Run one command and exit. Flags after -- belong to the guest command, not to 1vm.

Worth knowing

  • `1vm ssh` is the interactive shell; `1vm exec` is the single command. They are different commands on purpose.
  • `1vm ssh keys dev --regenerate` rotates the machine key, and `--print-public` gives you the public half.
  • Turning SSH on or off for a prepared machine keeps its recipe provisioning intact.

The long version

This page is the short path. For the whole area in prose — the options, the edge cases and what to do when it does not work — read SSH.

Related

Frequently asked questions

Do I have to create an SSH key?

No. 1VMTool generates a machine key and holds it. `--agent-ready` at create time wires up the key and cloud-init so `1vm exec` works from first boot.

Why did my `1vm exec` flags go to the wrong program?

They used to. Since 0.5.0 flags written after `--` belong to the guest command, so `1vm exec dev -- node --version` runs Node in the guest rather than printing the CLI's version.

Can I use my normal ssh client?

That is the point of `1vm ssh config --install`: it adds an include to ~/.ssh/config so plain `ssh dev`, scp, rsync and anything else that reads that file work by machine name.