AnyPane

Control your Mac from iPhone or iPad

macOS has a built-in VNC server called Screen Sharing. Turn it on, add the Mac to AnyPane, and you can see and control its desktop from an iPhone, an iPad or another Mac, with a terminal to the same Mac in the next pane.

What you need

1. Turn on Screen Sharing

  1. On the Mac, open System Settings → General → Sharing.
  2. Turn on Screen Sharing.
  3. Click the info button next to it and choose who may connect: all users, or only the accounts you list.
  4. Note the Mac’s local hostname at the bottom of the Sharing pane, such as studio.local, or its IP address.

On macOS Monterey and earlier, the same settings are in System Preferences → Sharing.

2. Turn on Remote Login

Remote Login is the Mac’s SSH server. In the same Sharing pane, turn on Remote Login and choose which users may log in. With it on, the screen travels inside an encrypted SSH connection. AnyPane’s direct VNC is not encrypted, so this step is strongly recommended, even at home.

3. Add the Mac to AnyPane

  1. Add an SSH connection. Address: the Mac’s hostname or IP address. Port: 22. Username: your macOS account name. Credential: the account password, or an OpenSSH Ed25519 key whose public key is in ~/.ssh/authorized_keys on the Mac.
  2. Connect once and verify the SHA-256 host key fingerprint. To see the Mac’s own fingerprint, run ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on it.
  3. Add a VNC connection. Address: 127.0.0.1. Port: 5900.
  4. Under Authentication, enter the same macOS account name and password. Apple Screen Sharing needs both.
  5. Under Security, set SSH Tunnel to the SSH connection from step 1.
  6. Add the VNC connection to a workspace and open it. Add the SSH connection too if you want a terminal on the same Mac.

The VNC address is 127.0.0.1 because it is resolved on the Mac at the other end of the SSH connection. VNC over SSH explains how the tunnel works.

The first time you connect to a device on your network, iOS and iPadOS ask whether AnyPane may find devices on your local network. Allow it. If you declined, turn it on in Settings → Privacy & Security → Local Network. On a Mac, the same switch is in System Settings → Privacy & Security → Local Network.

4. Use the desktop

Reach your Mac when you’re away

Don’t open port 5900 or 22 on your router to the internet. Put the Mac and your device on the same private network with a VPN such as Tailscale or WireGuard, and use the Mac’s VPN address as the SSH address. If the Mac sits behind a bastion server, use a jump host.

Troubleshooting

The connection times out
Check that both devices are on the same network or VPN, and that AnyPane has Local Network access. A sleeping Mac doesn’t answer: turn on Wake for network access in System Settings → Energy (Energy Saver on older macOS), or in Battery → Options on a MacBook.
SSH is refused
Remote Login is off, or your account isn’t allowed to use it. Check the Remote Login options in the Sharing pane.
SSH works, VNC doesn’t
Screen Sharing is off. On the Mac, lsof -nP -iTCP:5900 -sTCP:LISTEN should show a listener. The VNC address must be 127.0.0.1 and the port 5900.
VNC authentication failed
Use the macOS account name and password, and check that the account is allowed in the Screen Sharing options.
It disconnects when you switch apps
iOS and iPadOS may suspend connections in the background. Return to AnyPane and connect again.

Limits

AnyPane connects over VNC, so extras of Apple’s Screen Sharing app, such as remote audio and file transfer, aren’t available. No session recording. Direct VNC is not encrypted, so use the SSH tunnel.

FAQ

Do I need anything installed on the Mac?
No. Screen Sharing and Remote Login are built into macOS.
Can I control a Mac from another Mac?
Yes. AnyPane runs on macOS 15 and later, with the same steps.
Can I see the Mac without moving its pointer?
Yes. Use view-only mode.
Does this give me a terminal too?
Yes. The SSH connection from step 3 opens a terminal on the Mac in its own pane.

Related

Get AnyPane

View on App Store

For iPhone, iPad and Mac.