Learn how to configure and manage the SSH server and client on macOS
What is SSH?
SSH, or Secure Shell, is a network protocol that allows admins to securely access and manage a remote computer over an encrypted connection. It is commonly used by Mac admins to issue remote commands, access important files, and run applications on computers in their fleet.
How does SSH work?
macOS comes with a built-in SSH client accessible through Terminal. It also includes an SSH server, which is disabled by default, but can be enabled to allow remote access to your Mac. SSH uses cryptographic techniques to secure the connection between the client and server. This includes symmetric encryption, asymmetric encryption, and hashing to ensure data integrity and confidentiality during transmission. Using Kandji, admins can configure SSH according to their organization’s security tolerances under the General section within the SSH library item.
The /etc/ssh/ssh_config and /etc/ssh/sshd_config config files may return to their default values upon any update or major upgrade. However, the Kandji agent will automatically remediate and set the corresponding values defined in the SSH library item.
Add an SSH Library Item
Use the guidance below to meet NIST or STIG requirements for SSH in your Mac fleet. For organizations aiming to meet CIS Level 1 requirements without using a CIS Level 1 Blueprint, disabling the SSH server on macOS is recommended.
- Navigate to Library in the left-hand navigation bar.
- Click Add New on the top-right, and choose SSH.
- Click Add & Configure.
- Give the new SSH Library Item a Name.
- Assign to your desired Assignment Maps or Classic Blueprints.
- Select SSH server availability.
- Click On.
- Select Challenge-response authentication.
- Click On.
- Select Root login.
- Click Off.
- Select SSH login banner.
- Click On.
- Enter a custom Banner text per your organization’s security policy. You may also use the default text.
- Select Login attempt grace period.
- Ensure that the login attempt timeout is set to 30 seconds.
- Select Session timeout.
- Ensure that the session timeout is set to 900 seconds.
- Select Maximum alive count.
- Ensure that the alive count is set to 0 messages.
- Select Remove non-FIPS Ciphers.
- Select Remove non-FIPS Message Authentication Codes.
- Select Use secure key exchange algorithms.
- Click Save.