Check Whether Remote Login (SSH) Is Enabled
Use systemsetup -getremotelogin to see if other machines can SSH into this Mac.
Run `sudo systemsetup -getremotelogin` — 'Remote Login: On' means SSH is listening; turn it off with `sudo systemsetup -setremotelogin off`.
01Command
Command
$ sudo systemsetup -getremotelogin02What 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
!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
- systemsetup — configure System Preferences machine-level settings (macOS man page)Evidence: Documents `systemsetup -getremotelogin` and `-setremotelogin on|off` for the Remote Login (SSH) service.
Last verified: 2026-09-18 · Category: Security & Privacy