Check Whether Remote Login (SSH) Is Enabled

Use systemsetup -getremotelogin to see if other machines can SSH into this Mac.

macOSsshsystemsetupsecurityMedium risk
Run `sudo systemsetup -getremotelogin` — 'Remote Login: On' means SSH is listening; turn it off with `sudo systemsetup -setremotelogin off`.

01Command

Command
$ sudo systemsetup -getremotelogin

02What it does

Remote Login is the SSH server built into macOS; enabled, anyone who can reach the Mac on the network can attempt to log in. You never turned it on? It ships off by default, so an 'On' result deserves a look at who added it and why. Note that turning it off will disconnect any active SSH session — including your own if you are working remotely.

03Risk

RiskMedium risk
RequirementsRequires sudo; to turn it off if unexpectedly on, run `sudo systemsetup -setremotelogin off`.
!Warning: Disabling Remote Login terminates existing SSH sessions immediately, including the one you may be working through.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Security & Privacy

06Related solutions