Skip to content

SSH, Screen Sharing or Tailscale: how to connect to a remote Mac

What each way of reaching a remote Mac is good for, how to set up key-only SSH and macOS Screen Sharing, and when a Tailscale network is worth adding.

By MacRental teamPublished 3 min read

  • SSH
  • Screen Sharing
  • Tailscale
  • remote Mac

A remote Mac gives you three tools that overlap but are not interchangeable. SSH is a terminal. Screen Sharing is the graphical desktop. Tailscale is a private network that carries either of them. Most people end up using SSH for daily work and Screen Sharing when a task needs a window on screen.

SSH for everything that has a command line

Builds, git, package managers, test runs, coding agents and most automation work over SSH. It uses almost no bandwidth, it survives bad connections better than any graphical session, and it can be scripted. If you have never used keys, create one on your own computer and install it on the Mac once:

ssh-keygen -t ed25519 -C "my-laptop"
ssh-copy-id -p 40010 admin@203.0.113.10
ssh -p 40010 admin@203.0.113.10

The address and port above are placeholders. Use the values from your access email. Once the key works, turn password logins off on the Mac so that nobody can guess their way in. Create the file /etc/ssh/sshd_config.d/100-keys-only.conf with sudo and add these lines:

PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no

Test from a second terminal before you close the first one, so a typo cannot lock you out. Put the host in your ~/.ssh/config file so the long command becomes just ssh mac:

Host mac
  HostName 203.0.113.10
  Port 40010
  User admin
  ServerAliveInterval 30

You can also copy files over the same connection, without any extra software. scp and rsync both use SSH. With the alias above, rsync copies a project folder to the Mac and, on later runs, sends only what changed:

rsync -avz --exclude node_modules ./my-project/ mac:~/my-project/
scp mac:~/my-project/build.log .

For a repeatable setup, pull from git on the Mac instead of copying files, and use rsync for the things git does not hold, such as a test data set or a build artefact.

Screen Sharing for the desktop

Some tasks need a display: approving a system dialog, using Simulator, checking a UI, signing in to an app once. macOS includes Screen Sharing, which is VNC compatible. From another Mac, open Finder, press Command-K and enter vnc://203.0.113.10:40020, again with your own address and port. Third-party VNC clients work as well.

Screen Sharing is sensitive to latency and to your own network. Apple silicon Macs can use a High Performance mode when you connect from a Mac running macOS 14 or later. On a wired connection, anything under about 40 ms round trip is comfortable. Our latency page measures your own round trip to Prague in one click.

Tailscale as a private network

Tailscale creates an encrypted network between your devices. Each device gets a stable private address, and you reach the Mac by name without an open port. Connections are direct where the networks allow it and relayed otherwise, and a relayed connection is slower.

It is worth adding in three cases. You want the SSH port closed to the public internet. You move between networks and want one address that always works. Or you need other services on the Mac, such as a development server, reachable from your laptop without publishing them. It is software you install and manage yourself. It is optional, and it is not part of the MacRental service.

A related habit is to keep your private key protected with a passphrase and let the macOS keychain or ssh-agent remember it for the session. A key without a passphrase on a laptop that is lost is as good as a password written on the lid. If you use several machines, give each its own key, so you can remove one without touching the rest.

A simple combination

  1. Install your SSH key and disable password login.
  2. Keep long-running work in a tmux session so a dropped connection does not kill it.
  3. Use Screen Sharing only when a task needs a display.
  4. Add Tailscale if you want the public port closed or a stable address across networks.

The full step-by-step setup for a MacRental machine, including ports and the optional Tailscale route, is on the connect page.

When something does not connect

  • Connection refused or timed out: check the port number from your access email, then your local firewall or VPN.
  • Permission denied (publickey): the key is not installed, or your client offers a different key. Run ssh -v and read which keys it tries.
  • Screen Sharing connects but shows a black or frozen screen: reconnect, and check whether a display is attached or a virtual one is active.
  • Everything is slow: measure latency first, then try a wired connection.

Start with SSH keys, add Screen Sharing for the few tasks that need a desktop, and add Tailscale only if you want a closed port or a stable address. Do not rely on password logins on any machine that is reachable from the internet.

Need a Mac for this?

Mac Studio or Mac mini, for 1 to 365 days or monthly.

See machines and prices