Description
How to disable SSH on macOS using Jamf Pro (latest version tested 15.3.1).
Disabling SSH on macOS
Go to Computers > Configuration Profiles > New.
Configure Restrictions.
Under the Sharing services tab uncheck Allow modifying Remote Management Sharing setting (macOS 14 or later).
Under the Functionality tab uncheck Allow AirPlay, View Screen by Classroom, and Screen Sharing (macOS 10.14.4 or later, enrolled via a PreStage enrollment).
Scope to desired devices to set "This service has been configured by a profile" on devices under System Settings > General > Sharing for Screen Sharing and Remote Management.