Turn On Remote Login (SSH) with systemsetup
systemsetup -setremotelogin enables the macOS SSH server so you can log in from another machine.
Run `sudo systemsetup -setremotelogin on` on the Mac you want to reach, then connect with `ssh yourname@mac.local`.
01Command
Command
$ sudo systemsetup -setremotelogin on02What it does
Remote Login starts the sshd service, which is invaluable when a Mac becomes headless or its screen breaks — you can fix it from another computer. systemsetup is the supported front-end for this setting; the off switch undoes it just as cleanly. First connections prompt for a password over an encrypted channel, and you can later add keys for passwordless login. Remember that anyone with an account on that Mac can now log in remotely, so use strong passwords.
03Risk
!Warning: Enabling SSH lets every account on that Mac log in remotely — keep passwords strong.
04Undo
Undo
$ sudo systemsetup -setremotelogin off05Sources
- systemsetup — set system settings (macOS man page)Evidence: Documents -setremotelogin on|off, which enables or disables sshd-based Remote Login.
- launchctl — interact with launchd (macOS man page)Evidence: Background on launchd services such as sshd that Remote Login toggles.
Last verified: 2026-09-18 · Category: System & Settings