Turn On Remote Login (SSH) with systemsetup

systemsetup -setremotelogin enables the macOS SSH server so you can log in from another machine.

macOSsshsystemsetupsharingMedium risk
Run `sudo systemsetup -setremotelogin on` on the Mac you want to reach, then connect with `ssh yourname@mac.local`.

01Command

Command
$ sudo systemsetup -setremotelogin on

02What 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

RiskMedium risk
Requirementssudo required; run on the target Mac, then connect with `ssh user@mac.local`.
!Warning: Enabling SSH lets every account on that Mac log in remotely — keep passwords strong.

04Undo

Undo
$ sudo systemsetup -setremotelogin off

05Sources

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions