Posted on 01-12-2023 10:24 AM
The script I run to enable Remote Login and Remote Management has been the following:
#!/bin/sh
# enable remote management for ardadmin
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -activate -configure -clientopts -setmenuextra -menuextra no
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -configure -users adminuser -access -on -privs -all
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -configure -allowAccessFor -specifiedUsers -privs -all
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -restart -agent -menu
#enable remote login for ardadmin
sudo /usr/sbin/systemsetup -setremotelogin on
sudo dseditgroup -o edit -a adminuser -t user com.apple.access_ssh
exit 0
We just upgraded many of our computers to macOS Ventura. I've noticed with macOS Ventura that when trying to Control or Observe with Apple Remote Desktop newly provisioned macOS Ventura machines that it says to turn off and back on Remote Management. I have tested turning it off via terminal command and back on but sometimes I get the following error:
Screen recording might be disabled. Screen Sharing or Remote Management must be enabled from System Settings or via MDM.
Screen control might be disabled. Screen Sharing or Remote Management must be enabled from System Settings or via MDM.
If I do it manually it works every time, but I need to do this remotely in most cases.
I was reading and found on Apple's website this article: https://support.apple.com/en-ca/HT209161.
In Jamf Pro I don't see anywhere that I can do this. I can see in the computer record in the Management Tab a selection for Disable Remote Desktop but if I successfully do this it does not turn to Enable Remote Desktop.
Am I missing something? Is there a sure fire solution here?
Solved! Go to Solution.
Posted on 01-13-2023 05:36 AM
You should be able to use the "Management" tab in the Jamf computer details to enable. I've found that I may need to push the command a second time to trigger the update. Hope this helps.
Posted on 01-13-2023 05:36 AM
You should be able to use the "Management" tab in the Jamf computer details to enable. I've found that I may need to push the command a second time to trigger the update. Hope this helps.
Posted on 01-17-2023 05:41 AM
Is the only way to do this one computer at a time?
Posted on 01-17-2023 05:47 AM
You can apply this as an action remote command to a group so it can be applied to multiple computers at once.
06-12-2023 04:08 AM - edited 06-12-2023 04:21 AM
Hi @dletkeman Do you have an example on how to automate this?
Posted on 06-12-2023 04:52 AM
It’s been a while since I’ve looked, but if management commands can be sent via an API call, this should be scriptable.
That being said, I’m not sure it’s much of a help. If a device is offline, it won’t respond to the command, or be available via ARD anyway.
A workaround is to create a smart search of all devices where remote management is off, view the list and then use the Action button to send the command. Offline devices will receive the command when they come online.
Posted on 06-12-2023 05:21 AM
Thanks for the reply.
Yeah, I figured we'd have to do something outside of JAMF.
Great tip about the smart group. We did that already, and that is the best we can come up with it seems. Thanks!
Posted on 06-12-2023 05:34 AM
Glad you have a workable solution. Although I'd use a smart search rather than a smart group. since you're not using the group for scoping, you're just expending extra cycles every time a device checks in. A smart search accomplishes the same goal, but is less resource heavy server side.
Probably not an issue for a smaller deployment, but will add up with lots of groups and lots of devices.
Posted on 06-12-2023 05:36 AM
You are correct! I misread your post there. I'll try the smart search. Thanks!
Posted on 01-13-2023 05:58 AM
Thank you. I had to try twice before it would show enable remote desktop.
Posted on 01-13-2023 07:22 AM
Remote Management can no longer be enabled programmatically in macOS Mojave 10.14 and later. Options other than "activate" can still be used with the ardkickstart utility however (i.e. which user has which permission can still be configured). Once configured, Remote Management can be activated via MDM.
https://support.apple.com/en-us/HT201710
Remote Management status is a searchable attribute so an example workflow might be to run a policy to enable Remote Management for the local administrator user created by the PreStage, then enable as needed, or create an Advanced Computer Search to identify devices with the service disabled, and then send the command to enable it.
Posted on 11-05-2023 07:10 AM
This can also be enabled via API, but as always, sending API commands via script is inherently risky as your API credentials must be provided in some manner.
Posted on 08-01-2023 08:38 AM
Just want to clarify - the kickstart script can still be used for settings/users - but the enable command needs to be run in Jamf to activate?