Guides / Remote access security

Secure remote Mac access: SSH and Screen Sharing with least privilege

Updated 2026-10-22 · Based on Apple and OpenBSD documentation

Start by deciding what the task requires. SSH is for command-line access and file transfer; Screen Sharing is for interactive GUI control. They grant different capabilities, so authorize them separately. A practical baseline is to enable only the service in use, allow only named accounts, and remove temporary access when the work is done.

Know what each service can do

Apple says Screen Sharing and Remote Management cannot be enabled at the same time. If you only need a terminal, do not turn on a GUI service for convenience. If you need the desktop, do not assume every remote user also needs administrative control.

Limit who can connect

  1. In macOS System Settings, open General → Sharing and enable only the remote services required for the task.
  2. Review the allowed users for Remote Login and Screen Sharing separately. Where macOS offers “Only these users,” name the accounts that need access instead of treating every local account as a remote user.
  3. Use a separate standard account for routine work where practical. Use administrator privileges only for tasks that need them; avoid making an admin account your everyday remote login.
  4. Apple lists “Allow full disk access for remote users” as a separate setting. Ordinary SSH or desktop access should not automatically receive it. Assess that permission only for a task that requires it, then review it again when the task ends.

Protect SSH credentials and verify the host

When the server supports it, prefer public-key authentication. Use separate keys for different users or environments and protect each private key. Never put a private key in a code repository, shared document or chat. When someone leaves a project, a device is lost or a key may have been exposed, remove the corresponding public key from the Mac and rotate related credentials through your team’s process.

Verify the SSH host key when connecting: obtain the server fingerprint through a trusted console or administrator channel, then compare it with the fingerprint shown by your client. Do not accept a new key when you cannot confirm the host’s identity. OpenSSH’s StrictHostKeyChecking option can make the client reject unknown or changed host keys; with yes, it does not automatically accept a host-key change.

If a familiar host suddenly reports a changed key, stop and confirm through a trusted channel whether there was a planned reinstall or key rotation. Do not remove the old record or disable checking just to clear the warning; the change could also mean you reached a different host.

Keep GUI access within its intended scope

Screen Sharing can control the desktop, so grant it only to people who need GUI access and use a unique, strong credential. If you enable the VNC option, choose a dedicated VNC password rather than reusing an Apple Account or another important password. Turn off VNC access when it is no longer needed.

Before connecting from an external network, check the access method documented by the host or network administrator. When available, prefer a VPN, private network or explicit source-address restriction. Do not expose SSH or VNC to the entire internet without access controls. The available network restrictions depend on your environment, so follow its actual administration documentation.

Use a repeatable access review

Sources

This is a general remote-access security guide, not a security assessment of any cloud Mac provider. macOS versions, network policies and hosted environments differ; check the official administration documentation for your device and service.