Remote Login is the macOS sharing service that enables the built-in OpenSSH server on a Mac, so that authorized users can open a secure shell (SSH) session or transfer files with SFTP and scp from another computer. In macOS administration, it is the standard way to reach a Mac’s command line remotely for scripting, troubleshooting and maintenance without taking over the screen.
The switch lives in System Settings under General, then Sharing, and it is off by default. When it is turned on, macOS starts the sshd daemon through launchd and listens on TCP port 22, accepting connections only from accounts that the administrator permits.
How Remote Login runs the SSH service
Remote Login is a graphical control for the launchd job that runs OpenSSH, not a separate remote access product. Turning it on loads the com.openssh.sshd service, which launchd starts on demand for each incoming connection, so no idle daemon consumes resources while nobody is connected.
Access control relies on a hidden group named com.apple.access_ssh. When the administrator chooses Only these users in the Sharing pane, macOS adds the selected accounts to that group, and sshd refuses everyone else. Choosing All users removes the restriction, which is convenient but widens the attack surface.
The following table lists the main components involved when a client connects.
| Component | Role | Location or name |
|---|---|---|
| sshd daemon | Handles SSH connections | /usr/sbin/sshd |
| launchd job | Starts sshd on demand | com.openssh.sshd |
| Server configuration | Defines authentication and options | /etc/ssh/sshd_config and its .d folder |
| Access group | Limits which accounts may log in | com.apple.access_ssh |
| Host keys | Identify the Mac to clients | /etc/ssh/ssh_host_* files |
Ways to enable and check Remote Login
Administrators can enable Remote Login from System Settings, from Terminal or through device management. The Terminal method uses systemsetup, which in recent macOS versions requires Full Disk Access for the Terminal app or the management agent that runs it.
| Method | Command or path | Typical use |
|---|---|---|
| System Settings | General, Sharing, Remote Login | Single Mac at the desk |
| systemsetup | sudo systemsetup -setremotelogin on | Scripts and local setup |
| Status check | sudo systemsetup -getremotelogin | Audits and compliance checks |
| MDM script | Script deployed by the management server | Fleets of managed Macs |
| launchctl | Load or unload the sshd job | Troubleshooting a stuck service |
The same settings apply on Intel and Apple silicon Macs, and the service behaves identically on desktops and laptops. On a portable Mac, however, the computer must be awake and connected to the network for a session to start, so administrators often pair Remote Login with wake for network access in the energy settings or schedule maintenance while the machine is plugged in.
Since macOS Ventura, the pane also offers Allow full disk access for remote users. Without it, an SSH session cannot read protected locations such as Mail data or other users’ Desktop folders, because privacy controls apply to the remote shell as they do to local apps.
Remote Login compared with other remote access services
macOS offers several remote services in the Sharing pane, and each one exposes a different layer of the system. Remote Login gives command-line access only, which makes it lightweight and precise but unsuitable for tasks that need the desktop.
| Service | What it provides | Protocol | Best fit |
|---|---|---|---|
| Remote Login | Shell and file transfer | SSH on port 22 | Scripts and administration |
| Screen Sharing | View and control the desktop | VNC-based, port 5900 | Helping a user visually |
| Remote Management | Apple Remote Desktop features | ARD protocols | Managing labs and groups |
| Remote Apple Events | Scripting apps on the Mac | Apple Events over network | Automation between Macs |
| File Sharing | Network volumes | SMB | Shared folders |
In managed environments, MDM handles most configuration through configuration profiles and declarative management, but Remote Login remains useful when a technician must inspect logs, run diagnostics or repair a management agent that is not responding.
Securing Remote Login on managed Macs
An open SSH service is a frequent target for password-guessing attacks, so Remote Login should be enabled only where it serves a clear purpose and restricted to named administrator accounts. Hardening focuses on authentication, network exposure and logging.
- Use public key authentication and disable password logins in a drop-in file under
/etc/ssh/sshd_config.d/. - Restrict access with Only these users rather than All users.
- Keep port 22 unreachable from the internet, and require a VPN for off-site access.
- Enable the application firewall and review unified logs for repeated failed logins.
- Grant full disk access for remote users only when tasks truly require it.
Major macOS updates can replace the default sshd_config file, so custom settings belong in the .d drop-in folder, which survives system updates more reliably.
Common problems with Remote Login
Most connection failures come from network reachability, account restrictions or privacy controls rather than from a broken SSH server. The table maps typical symptoms to their causes.
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused | Remote Login is off | Turn it on in Sharing |
| Permission denied for a valid user | User not in the allowed list | Add the user under Only these users |
| Operation not permitted in some folders | Missing full disk access | Enable full disk access for remote users |
| systemsetup reports an error | Terminal lacks Full Disk Access | Grant access in Privacy and Security |
| Host key warning on the client | Mac reinstalled or keys regenerated | Verify and update the known_hosts entry |
In everyday language
Remote Login is a switch that lets you control a Mac by typing commands from another computer. You do not see the Mac’s screen. You see a text window instead.
IT staff use it to fix problems without walking to the desk. Only people with an account and permission can connect. It is off unless someone turns it on. The key point is simple: turn it on only when needed, and allow only trusted accounts.
Seen in the real world
A university research lab runs 20 Mac mini computers that process microscope images overnight. The lab’s administrator enables Remote Login on each machine and limits access to two administrator accounts that sign in with SSH keys. Password logins are disabled in a drop-in configuration file, and the Macs are reachable only from the campus network.
One morning, the image pipeline on three machines has stopped. From an office laptop, the administrator connects over SSH, reads the job logs, finds that a disk is nearly full, deletes old temporary files and restarts the processing script with launchctl. The whole repair takes about 15 minutes, without visiting the server room or interrupting the other machines.