# Use another Mac's machines

Pair two Macs, then open and control one Mac's machines from the other.

## Pair your Macs

The Mac with the machines is the host. The other Mac reaches it on the same network, or through a VPN you run.

1. On the host, choose **OSMates > Settings**, then click **Remote**.
2. Under **This Network**, turn on **Let your other Macs connect**.
3. Under **Paired Macs**, click **Pair a Mac**. The host waits five minutes.
4. On the other Mac, click **Connect to a Mac** in **Remote** settings.
5. Choose the host, or enter its address, such as `studio.local`. Then click **Connect**.
6. On the host, type the six-digit code that the other Mac shows, then click **Pair**.
7. On the other Mac, click **It Did** if the host names it as paired.

Allow local network access on both Macs, or nearby Macs don't appear, as [Mac isn't found when pairing](https://osmates.com/docs/known-issues#mac-isnt-found-when-pairing) explains. On a host without a screen, run `osmates remote set network on`, then `osmates remote pair`.

To unpair, click **Unpair** beside the Mac in **Remote** settings. The host ends that Mac's sessions and revokes what its agents were allowed.

## Use a paired Mac

Select the host under **Remote Macs** in the library sidebar. Questions from the host's agents appear on every paired Mac. To drive the host's machines from an agent, see [Drive another Mac's machines](https://osmates.com/docs/agents#drive-another-macs-machines).

1. Under **Remote Macs**, double-click a machine. For one that's off, click **Start** in its window.
2. Click in the window to type in the machine. Press Control-Option to release the keyboard.

While an agent drives the machine, click **Take Control**, as in [Take control from an agent](https://osmates.com/docs/agent-control). The host records each action under this Mac's name.

### Let a macOS machine send its screen

1. On the host, open the machine's window.
2. In the machine, choose **Apple menu > System Settings**, then click **Privacy & Security** in the sidebar.
3. Click **Screen & System Audio Recording**, then turn on **OSMates Agent**.

Clones keep this permission. If the machine shows the request again, allow it on the host.

## Keep a host reachable

The host must be awake and logged in. To keep it awake while a machine runs, turn on [Keep This Mac Awake While It Runs](https://osmates.com/docs/power#keep-a-machine-running-while-youre-away). If it sleeps anyway, see [Paired Mac is unreachable while asleep](https://osmates.com/docs/known-issues#paired-mac-is-unreachable-while-asleep).

## Use your machines from another device

Without OSMates on the other device, share the host's screen or use ssh.

1. On the host, choose **Apple menu > System Settings**, then click **General** in the sidebar.
2. Click **Sharing**, then turn on **Screen Sharing**, and **Remote Login** for ssh.
3. Connect with Screen Sharing or a VNC app, or with `ssh` to run `osmates`.

With FileVault on, unlock the host over ssh after a restart, then log in once through Screen Sharing.

## Restore access to this Mac's key

If the keychain needs your permission for the pairing key, **Remote** settings say why. Click **Allow** there, then **Always Allow** in the Keychain dialog. Your Macs stay paired.

If the key is missing, click **New Device Key**, then pair every Mac again. See also [Keychain asks for the pairing key again](https://osmates.com/docs/known-issues#keychain-asks-for-the-pairing-key-again).

## Limits

- A macOS machine at its login window sends no picture. Click **Sign In**.
- A Wayland desktop, such as GNOME or KDE, can't be viewed, except on the OSMates engine. Use Xfce, or open the machine on the host.
- A machine can be viewed from 2 places at a time, paired Macs and browsers together.
