Skip to main content
The SSH server control sets SSH on your Macs. Turn Remote Login, the Mac’s SSH server, on or off, block root and password logins, show a banner before login, close idle connections, and restrict SSH to FIPS algorithms. Two settings apply to the SSH client employees run from the Mac.

Platform compatibility

Requires macOS 15 or later.

Set up the control

1

Add a configuration

Go to MDM > Controls, open SSH server, then click Add configuration.
2

Configure the settings

Set each setting you want to enforce. See the settings below. Configure at least one setting.
3

Select targeting

Choose which devices to apply the configuration to: all macOS devices, specific device groups, or a custom target. Click Activate to deploy the configuration. Save keeps it inactive.
A setting left empty or on Not configured isn’t written: the Mac keeps its own setting.

Settings

  • Remote Login (SSH server) starts or stops the SSH server of the Mac. Not configured leaves it as it is.
  • Block password authentication over SSH leaves key-based authentication as the only way to log in over SSH.
  • Penalize addresses that fail to log in makes the Mac refuse connections for a while from an address that keeps failing to log in.
  • Banner shown before SSH login is written to /etc/banner and shown before the password prompt.
  • Client check interval (seconds) and Unanswered client checks before disconnecting close a connection whose client stops answering.
  • FIPS algorithms only (server and client) and the two SSH client settings also apply to the connections employees open from the Mac.

How it works

Primo runs a script on each Mac and checks the result with a policy. The script writes the SSH server and SSH client settings to files of its own in /etc/ssh, read before macOS’s own settings so that they take precedence. It checks that SSH still reads its configuration before keeping them, and puts the previous files back otherwise. Each new SSH connection picks up the settings, with no restart. The script saves the Mac’s own Remote Login state and /etc/banner first. When a configuration stops managing them, or when you remove the control, Primo puts them back. If someone edits Primo’s files or adds an SSH configuration file that would take precedence, the policy fails and Primo runs the script again.
Before you turn Remote Login (SSH server) off or turn on Block password authentication over SSH, check that nobody relies on SSH to reach these Macs, such as a support tool or a build pipeline.

Modify or remove the control

Open the control from MDM > Controls to edit, deactivate or replace the configuration.